Support multiple properties on NPW-based animations. [chromium/src : main]

1 view
Skip to first unread message

Kevin Ellis (Gerrit)

unread,
May 22, 2026, 1:25:08 PM (4 days ago) May 22
to Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
Attention needed from Claire Chambers

Kevin Ellis added 2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Kevin Ellis . resolved

Please take a look.

File third_party/blink/renderer/core/paint/clip_path_clipper.cc
Line 271, Patchset 2 (Parent):#if EXPENSIVE_DCHECKS_ARE_ON()
Kevin Ellis . resolved

This check is not assured if we have a background-color and clip-path animation in the same animation. The background-color animation can force a late fallback to main due to detection of a pixel-moving filter. As far as paint is concerned, the animation is composited, but can potentially fall back to main in Animation::PreCommit, which has the final say.

Open in Gerrit

Related details

Attention is currently required from:
  • Claire Chambers
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
Gerrit-Change-Number: 7870785
Gerrit-PatchSet: 3
Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-CC: Xida Chen <xida...@chromium.org>
Gerrit-Attention: Claire Chambers <clcha...@microsoft.com>
Gerrit-Comment-Date: Fri, 22 May 2026 17:25:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kevin Ellis (Gerrit)

unread,
May 22, 2026, 1:32:29 PM (4 days ago) May 22
to Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
Attention needed from Claire Chambers

Kevin Ellis added 1 comment

File third_party/blink/renderer/modules/csspaint/nativepaint/background_color_paint_definition.cc
Line 63, Patchset 3 (Latest): DocumentLifecycle::kInPrePaint) {
Kevin Ellis . resolved

This change is needed as when we have both a clip-path and background-color change in the same animation we trigger a call for whether enabled on the compositor from pre-paint instead of paint. At the pre-paint stage, the first fragment does not have local border box properties. It is OK to return false early and then true later. It just means we think the animation is supported on the compositor only to find out it isn't later. The graceful fallback to main in PreCommit ensures that things are in check.

Gerrit-Comment-Date: Fri, 22 May 2026 17:32:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Claire Chambers (Gerrit)

unread,
May 25, 2026, 2:25:15 AM (yesterday) May 25
to Kevin Ellis, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
Attention needed from Kevin Ellis

Claire Chambers added 5 comments

File third_party/blink/renderer/core/animation/animation.cc
Line 891, Patchset 5 (Latest): npw_reasons != NativePaintWorkletProperties::kNoPaintWorklet) {
Claire Chambers . unresolved

Could we gate this behind the FF? I am almost certain this code could never cause a problem, but I am paranoid about turning an obscure undiscovered painting bug into a client crash and blocking the experiment as we're running it in stable.

If you like, you can just gate the clip-path specific check.

Line 898, Patchset 5 (Latest): // We make one exception for the forced reset for background-color.
// The eligibility for compositing is make at paint time. Hold off on the
// rest until the element has been painted.
Claire Chambers . unresolved

not sure what 'the rest' means here, I think you actually meant to say the opposite (?).


```suggestion
// We only fall back the NPW status if it has received an eligibility
// determination. If it hasn't, this could mean its target is outside the
// paint apron or been made invisible with CSS, and is still potentially
// compositable.
```
Line 908, Patchset 5 (Latest): if (npw_reasons & NativePaintWorkletProperties::kClipPathPaintWorklet) {
element_animations->SetCompositedClipPathStatus(
ElementAnimations::CompositedPaintStatus::kNotComposited);
}
Claire Chambers . unresolved

There is actually an obscure case this will change behavior. If you start a clip-path animation with WAAPI while its parent has `content-visibility: hidden`, you will not have yet had a clip-path eligibility calculation, but `PreCommit` still runs. The animation fails to composite as it has no `LayoutObject` and thus you get `kAnimationHasNoVisibleChange`. As soon as you change `content-visibility: visible`, the element gets pre-paint and paint, but there's no eligibility recalc, so if this code were left unchanged you would be leaving a compositable animation as `kNotComposited`.

I am doubtful this case exists in the wild (though I did test it when I was hunting for clip-path bugs back during the PAC clip hierarchy bug investigation), but you can fix it by just applying your same bgcolor check for clip-path.

File third_party/blink/renderer/core/animation/compositor_animations.cc
Line 119, Patchset 5 (Latest):bool HasNativePaintWorketReason(
Claire Chambers . unresolved

Should this just be a member of `Animation`? I see why you did it this way, because we assign `npw_reasons` conditionally based on the timeline type.

However, this could be replaced with `const bool timeline_supports_npw = timeline && timeline->IsMonotonicallyIncreasing()`.

You could use this function in `PreCommit` and it would make it slightly more readable.

File third_party/blink/renderer/core/paint/clip_path_clipper.cc
Line 270, Patchset 5 (Parent):
#if EXPENSIVE_DCHECKS_ARE_ON()
if (animation &&
CompositeClipPathStatus(element) == CompositedPaintStatus::kComposited) {
CHECK(animation->HasActiveAnimationsOnCompositor() ||
animation->CheckCanStartAnimationOnCompositor(
nullptr, StartOnCompositorReason::kGeneric) ==
CompositorAnimations::kNoFailure);
}
#endif // EXPENSIVE_DCHECKS_ARE_ON()
Claire Chambers . unresolved

Can we keep this `DCHECK`? You added a lifecycle check in `CompositorMayHaveIncorrectDamageRect`, so this should should pass now? Apologies if I am wrong, I have not tried building your change to verify.

Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Ellis
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
    Gerrit-Change-Number: 7870785
    Gerrit-PatchSet: 5
    Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
    Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
    Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-CC: Xida Chen <xida...@chromium.org>
    Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
    Gerrit-Comment-Date: Mon, 25 May 2026 06:24:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Claire Chambers (Gerrit)

    unread,
    May 25, 2026, 2:28:20 AM (yesterday) May 25
    to Kevin Ellis, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
    Attention needed from Kevin Ellis

    Claire Chambers added 1 comment

    File third_party/blink/renderer/core/paint/clip_path_clipper.cc
    Line 270, Patchset 5 (Parent):
    #if EXPENSIVE_DCHECKS_ARE_ON()
    if (animation &&
    CompositeClipPathStatus(element) == CompositedPaintStatus::kComposited) {
    CHECK(animation->HasActiveAnimationsOnCompositor() ||
    animation->CheckCanStartAnimationOnCompositor(
    nullptr, StartOnCompositorReason::kGeneric) ==
    CompositorAnimations::kNoFailure);
    }
    #endif // EXPENSIVE_DCHECKS_ARE_ON()
    Claire Chambers . unresolved

    Can we keep this `DCHECK`? You added a lifecycle check in `CompositorMayHaveIncorrectDamageRect`, so this should should pass now? Apologies if I am wrong, I have not tried building your change to verify.

    Claire Chambers

    Nevermind, I'm stupid. I see your comment and I understand now. The case this breaks in is when we're in paint and the background has painted but the svg clip hasn't yet, and this will fail with `kUnsupportedCSSProperty` due to bgcolor being `kNotComposited`.

    It's ugly, but you can fix this by simply checking the npw reasons of the animation and excluding the case. If that doesn't work in your mind for some reason, ignore this comment.

    Gerrit-Comment-Date: Mon, 25 May 2026 06:28:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Claire Chambers <clcha...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kevin Ellis (Gerrit)

    unread,
    May 25, 2026, 12:30:44 PM (14 hours ago) May 25
    to Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
    Attention needed from Claire Chambers

    Kevin Ellis added 5 comments

    File third_party/blink/renderer/core/animation/animation.cc
    Line 891, Patchset 5: npw_reasons != NativePaintWorkletProperties::kNoPaintWorklet) {
    Claire Chambers . resolved

    Could we gate this behind the FF? I am almost certain this code could never cause a problem, but I am paranoid about turning an obscure undiscovered painting bug into a client crash and blocking the experiment as we're running it in stable.

    If you like, you can just gate the clip-path specific check.

    Kevin Ellis

    Done

    Line 898, Patchset 5: // We make one exception for the forced reset for background-color.

    // The eligibility for compositing is make at paint time. Hold off on the
    // rest until the element has been painted.
    Claire Chambers . resolved

    not sure what 'the rest' means here, I think you actually meant to say the opposite (?).


    ```suggestion
    // We only fall back the NPW status if it has received an eligibility
    // determination. If it hasn't, this could mean its target is outside the
    // paint apron or been made invisible with CSS, and is still potentially
    // compositable.
    ```
    Kevin Ellis

    Done

    Line 908, Patchset 5: if (npw_reasons & NativePaintWorkletProperties::kClipPathPaintWorklet) {

    element_animations->SetCompositedClipPathStatus(
    ElementAnimations::CompositedPaintStatus::kNotComposited);
    }
    Claire Chambers . resolved

    There is actually an obscure case this will change behavior. If you start a clip-path animation with WAAPI while its parent has `content-visibility: hidden`, you will not have yet had a clip-path eligibility calculation, but `PreCommit` still runs. The animation fails to composite as it has no `LayoutObject` and thus you get `kAnimationHasNoVisibleChange`. As soon as you change `content-visibility: visible`, the element gets pre-paint and paint, but there's no eligibility recalc, so if this code were left unchanged you would be leaving a compositable animation as `kNotComposited`.

    I am doubtful this case exists in the wild (though I did test it when I was hunting for clip-path bugs back during the PAC clip hierarchy bug investigation), but you can fix it by just applying your same bgcolor check for clip-path.

    Kevin Ellis

    Logic now consistent for clip-path and BG-color.

    File third_party/blink/renderer/core/animation/compositor_animations.cc
    Line 119, Patchset 5:bool HasNativePaintWorketReason(
    Claire Chambers . resolved

    Should this just be a member of `Animation`? I see why you did it this way, because we assign `npw_reasons` conditionally based on the timeline type.

    However, this could be replaced with `const bool timeline_supports_npw = timeline && timeline->IsMonotonicallyIncreasing()`.

    You could use this function in `PreCommit` and it would make it slightly more readable.

    Kevin Ellis

    I might be missing something here. This is a temporary method while we have the 2-code paths (with and without multiple property support). If only supporting a single property, we require an exact match, otherwise we set the single bit.

    This method is being used downstream of a check for a monotonic timeline, but the method itself has nothing to do with the type of timeline. Failure of NPWs with SDA is a separate issue (likely tied to not having full support for start/end delays).

    I don't see an overlap with the PreCommit logic either.

    File third_party/blink/renderer/core/paint/clip_path_clipper.cc
    Line 270, Patchset 5 (Parent):
    #if EXPENSIVE_DCHECKS_ARE_ON()
    if (animation &&
    CompositeClipPathStatus(element) == CompositedPaintStatus::kComposited) {
    CHECK(animation->HasActiveAnimationsOnCompositor() ||
    animation->CheckCanStartAnimationOnCompositor(
    nullptr, StartOnCompositorReason::kGeneric) ==
    CompositorAnimations::kNoFailure);
    }
    #endif // EXPENSIVE_DCHECKS_ARE_ON()
    Claire Chambers . resolved

    Can we keep this `DCHECK`? You added a lifecycle check in `CompositorMayHaveIncorrectDamageRect`, so this should should pass now? Apologies if I am wrong, I have not tried building your change to verify.

    Claire Chambers

    Nevermind, I'm stupid. I see your comment and I understand now. The case this breaks in is when we're in paint and the background has painted but the svg clip hasn't yet, and this will fail with `kUnsupportedCSSProperty` due to bgcolor being `kNotComposited`.

    It's ugly, but you can fix this by simply checking the npw reasons of the animation and excluding the case. If that doesn't work in your mind for some reason, ignore this comment.

    Kevin Ellis

    As we know exactly why this might happen, I'm reluctant to add special case bloat. A fallback is simply a natural result of we make a tentative yes decision upstream of having all of the facts.

    In a follow up patch, I'm planning to add fallback in the clip-path only case when the clip itself is blurred (we have the same bug here).Note that clipping the bug is absolutely fine on the compositor. Blurring the clip is problematic when the blur radius applied ot the clip exceeds the clip bounds. I have a demo.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Claire Chambers
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
      Gerrit-Change-Number: 7870785
      Gerrit-PatchSet: 7
      Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
      Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
      Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-CC: Xida Chen <xida...@chromium.org>
      Gerrit-Attention: Claire Chambers <clcha...@microsoft.com>
      Gerrit-Comment-Date: Mon, 25 May 2026 16:30:29 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Claire Chambers (Gerrit)

      unread,
      May 25, 2026, 3:51:43 PM (11 hours ago) May 25
      to Kevin Ellis, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
      Attention needed from Kevin Ellis

      Claire Chambers added 4 comments

      Commit Message
      Line 7, Patchset 7 (Latest):Support multiple properties on NPW-based animations.
      Claire Chambers . resolved

      I really appreciate all the work you did to get this to work with clip-paths. :)

      LGTM w/tiny nit

      File third_party/blink/renderer/core/animation/animation.cc
      Line 908, Patchset 5: if (npw_reasons & NativePaintWorkletProperties::kClipPathPaintWorklet) {
      element_animations->SetCompositedClipPathStatus(
      ElementAnimations::CompositedPaintStatus::kNotComposited);
      }
      Claire Chambers . resolved

      There is actually an obscure case this will change behavior. If you start a clip-path animation with WAAPI while its parent has `content-visibility: hidden`, you will not have yet had a clip-path eligibility calculation, but `PreCommit` still runs. The animation fails to composite as it has no `LayoutObject` and thus you get `kAnimationHasNoVisibleChange`. As soon as you change `content-visibility: visible`, the element gets pre-paint and paint, but there's no eligibility recalc, so if this code were left unchanged you would be leaving a compositable animation as `kNotComposited`.

      I am doubtful this case exists in the wild (though I did test it when I was hunting for clip-path bugs back during the PAC clip hierarchy bug investigation), but you can fix it by just applying your same bgcolor check for clip-path.

      Kevin Ellis

      Logic now consistent for clip-path and BG-color.

      Claire Chambers

      Thanks 😊

      File third_party/blink/renderer/core/animation/compositor_animations.cc
      Line 119, Patchset 5:bool HasNativePaintWorketReason(
      Claire Chambers . unresolved

      Should this just be a member of `Animation`? I see why you did it this way, because we assign `npw_reasons` conditionally based on the timeline type.

      However, this could be replaced with `const bool timeline_supports_npw = timeline && timeline->IsMonotonicallyIncreasing()`.

      You could use this function in `PreCommit` and it would make it slightly more readable.

      Kevin Ellis

      I might be missing something here. This is a temporary method while we have the 2-code paths (with and without multiple property support). If only supporting a single property, we require an exact match, otherwise we set the single bit.

      This method is being used downstream of a check for a monotonic timeline, but the method itself has nothing to do with the type of timeline. Failure of NPWs with SDA is a separate issue (likely tied to not having full support for start/end delays).

      I don't see an overlap with the PreCommit logic either.

      Claire Chambers

      Sorry, I didn't explain myself properly. In `PreCommit` you have `npw_reasons & NativePaintWorkletProperties::kProperty` checks and here you also have the same.

      In principle, you could just `animation->HasNPWProperty(...)`

      I mentioned the timeline case because downstream you conditionally assign `npw_reasons` based on the timeline type, and that's how we fall back in that case (`npw_reasons == 0` --> equality in the switch fails --> `generator` left as `nullptr` --> `DefaultToUnsupportedProperty`). However, you could just store this boolean and read it directly, allowing you to delete `npw_reasons` entirely.

      However, to your point, this would only save 1 line, and only a few characters vs bitwise algebra, so this is an unimportant nit especially since NPW (probably?) isn't going to be the main method to composite new properties going forward. I'll leave it up to you.

      File third_party/blink/renderer/core/paint/clip_path_clipper.cc
      Line 270, Patchset 5 (Parent):
      #if EXPENSIVE_DCHECKS_ARE_ON()
      if (animation &&
      CompositeClipPathStatus(element) == CompositedPaintStatus::kComposited) {
      CHECK(animation->HasActiveAnimationsOnCompositor() ||
      animation->CheckCanStartAnimationOnCompositor(
      nullptr, StartOnCompositorReason::kGeneric) ==
      CompositorAnimations::kNoFailure);
      }
      #endif // EXPENSIVE_DCHECKS_ARE_ON()
      Claire Chambers . resolved

      Can we keep this `DCHECK`? You added a lifecycle check in `CompositorMayHaveIncorrectDamageRect`, so this should should pass now? Apologies if I am wrong, I have not tried building your change to verify.

      Claire Chambers

      Nevermind, I'm stupid. I see your comment and I understand now. The case this breaks in is when we're in paint and the background has painted but the svg clip hasn't yet, and this will fail with `kUnsupportedCSSProperty` due to bgcolor being `kNotComposited`.

      It's ugly, but you can fix this by simply checking the npw reasons of the animation and excluding the case. If that doesn't work in your mind for some reason, ignore this comment.

      Kevin Ellis

      As we know exactly why this might happen, I'm reluctant to add special case bloat. A fallback is simply a natural result of we make a tentative yes decision upstream of having all of the facts.

      In a follow up patch, I'm planning to add fallback in the clip-path only case when the clip itself is blurred (we have the same bug here).Note that clipping the bug is absolutely fine on the compositor. Blurring the clip is problematic when the blur radius applied ot the clip exceeds the clip bounds. I have a demo.

      Claire Chambers

      Ack. I'll just apply this to our DWCs in edge. I'll let you know if we get any unexpected hits.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Kevin Ellis
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
        Gerrit-Change-Number: 7870785
        Gerrit-PatchSet: 7
        Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
        Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
        Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-CC: Xida Chen <xida...@chromium.org>
        Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
        Gerrit-Comment-Date: Mon, 25 May 2026 19:51:28 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Kevin Ellis <kev...@chromium.org>
        Comment-In-Reply-To: Claire Chambers <clcha...@microsoft.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Claire Chambers (Gerrit)

        unread,
        May 25, 2026, 3:52:07 PM (11 hours ago) May 25
        to Kevin Ellis, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
        Attention needed from Kevin Ellis

        Claire Chambers voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kevin Ellis
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
          Gerrit-Change-Number: 7870785
          Gerrit-PatchSet: 7
          Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
          Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
          Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: Xida Chen <xida...@chromium.org>
          Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
          Gerrit-Comment-Date: Mon, 25 May 2026 19:51:58 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kevin Ellis (Gerrit)

          unread,
          May 25, 2026, 5:21:39 PM (10 hours ago) May 25
          to Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org

          Kevin Ellis added 1 comment

          File third_party/blink/renderer/core/animation/compositor_animations.cc
          Line 119, Patchset 5:bool HasNativePaintWorketReason(
          Claire Chambers . resolved

          Should this just be a member of `Animation`? I see why you did it this way, because we assign `npw_reasons` conditionally based on the timeline type.

          However, this could be replaced with `const bool timeline_supports_npw = timeline && timeline->IsMonotonicallyIncreasing()`.

          You could use this function in `PreCommit` and it would make it slightly more readable.

          Kevin Ellis

          I might be missing something here. This is a temporary method while we have the 2-code paths (with and without multiple property support). If only supporting a single property, we require an exact match, otherwise we set the single bit.

          This method is being used downstream of a check for a monotonic timeline, but the method itself has nothing to do with the type of timeline. Failure of NPWs with SDA is a separate issue (likely tied to not having full support for start/end delays).

          I don't see an overlap with the PreCommit logic either.

          Claire Chambers

          Sorry, I didn't explain myself properly. In `PreCommit` you have `npw_reasons & NativePaintWorkletProperties::kProperty` checks and here you also have the same.

          In principle, you could just `animation->HasNPWProperty(...)`

          I mentioned the timeline case because downstream you conditionally assign `npw_reasons` based on the timeline type, and that's how we fall back in that case (`npw_reasons == 0` --> equality in the switch fails --> `generator` left as `nullptr` --> `DefaultToUnsupportedProperty`). However, you could just store this boolean and read it directly, allowing you to delete `npw_reasons` entirely.

          However, to your point, this would only save 1 line, and only a few characters vs bitwise algebra, so this is an unimportant nit especially since NPW (probably?) isn't going to be the main method to composite new properties going forward. I'll leave it up to you.

          Kevin Ellis

          In PreCommit we have A & B, whereas here we have A & B or A == B depending on the flag setting. Though with the added Runtime flag check it amounts to A & B in Precommit, that is extra logic to sort though just to save a line or two of code. I'd rather leave as is.

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
            Gerrit-Change-Number: 7870785
            Gerrit-PatchSet: 7
            Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
            Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
            Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-CC: Xida Chen <xida...@chromium.org>
            Gerrit-Comment-Date: Mon, 25 May 2026 21:21:27 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Kevin Ellis (Gerrit)

            unread,
            May 25, 2026, 5:22:22 PM (10 hours ago) May 25
            to Vladimir Levin, Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
            Attention needed from Vladimir Levin

            Kevin Ellis added 1 comment

            Patchset-level comments
            File-level comment, Patchset 7 (Latest):
            Kevin Ellis . resolved

            +vmpstr for CC change.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Vladimir Levin
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
            Gerrit-Change-Number: 7870785
            Gerrit-PatchSet: 7
            Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
            Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
            Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
            Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
            Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
            Gerrit-Comment-Date: Mon, 25 May 2026 21:22:12 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Vladimir Levin (Gerrit)

            unread,
            May 25, 2026, 5:29:08 PM (9 hours ago) May 25
            to Kevin Ellis, Claire Chambers, Chromium LUCI CQ, Xida Chen, Olga Gerchikov, Menard, Alexis, android-bu...@system.gserviceaccount.com, kinuko...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, blink-rev...@chromium.org, cc-...@chromium.org, blink-revie...@chromium.org
            Attention needed from Kevin Ellis

            Vladimir Levin voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Kevin Ellis
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I07a00f0e64457348617f0018716c659a372719ff
            Gerrit-Change-Number: 7870785
            Gerrit-PatchSet: 7
            Gerrit-Owner: Kevin Ellis <kev...@chromium.org>
            Gerrit-Reviewer: Claire Chambers <clcha...@microsoft.com>
            Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
            Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-CC: Xida Chen <xida...@chromium.org>
            Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
            Gerrit-Comment-Date: Mon, 25 May 2026 21:28:54 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages