Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ec02f597f7a6e3fd1ccbf092b3493963242bdfb
      
https://github.com/WebKit/WebKit/commit/5ec02f597f7a6e3fd1ccbf092b3493963242bdfb
  Author: Kiet Ho <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/WebCore/css/values/color/CSSRelativeColor.h

  Log Message:
  -----------
  containsCurrentColor(CSS::RelativeColor) doesn't check for current color
rdar://188042543
https://bugs.webkit.org/show_bug.cgi?id=324774

Reviewed by Sam Weinig.

There's a typo in containsCurrentColor(CSS::RelativeColor) where it
actually checks whether the origin color is color scheme dependent.

template<typename Descriptor>
bool containsCurrentColor(const RelativeColor<Descriptor>& unresolved)
{
    return containsColorSchemeDependentColor(unresolved.origin);
}

Fix it to check for currentColor instead.

No test because this is not observable. This check is only used by
CSSGradientValue::createStyleImage to figure out whether to cache the
created Style::GradientImage. Style::GradientImage then checks again
to cache the generated gradient image, but this check is implemented
correctly.

* Source/WebCore/css/values/color/CSSRelativeColor.h:
(WebCore::CSS::containsCurrentColor):

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



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

Reply via email to