Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ff1dfaf627da4840189e616672cb8004ffb208a
      
https://github.com/WebKit/WebKit/commit/5ff1dfaf627da4840189e616672cb8004ffb208a
  Author: Nathan Solomon <[email protected]>
  Date:   2026-02-14 (Sat, 14 Feb 2026)

  Changed paths:
    M Source/WebCore/style/Styleable.cpp

  Log Message:
  -----------
  Add early return to Styleable::cancelStyleOriginatedAnimations()
https://bugs.webkit.org/show_bug.cgi?id=307711
rdar://170265233

Reviewed by Ryosuke Niwa.

cancelStyleOriginatedAnimations is called frequently during style resolution
and renderer teardown, including on elements that have never had animations.
This function performs cleanup on animation-related data structures. However,
all animation state for an element lives in a single ElementAnimationRareData
container. If no animation data exists for the element, there is nothing to
clean up.

Without an early return, it performs 3 rare data lookups even
when the element has no animation data.

Add an early return when no animation data exists to reduce the amount
of rare data lookups from 3 -> 1.

This is a performance improvement.

* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::cancelStyleOriginatedAnimations const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to