Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 67847a3bb5d909edad965f7555651612cec1341d
      
https://github.com/WebKit/WebKit/commit/67847a3bb5d909edad965f7555651612cec1341d
  Author: Sam Weinig <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    R Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
    R Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
    M Source/WebCore/platform/graphics/Image.cpp
    M Source/WebCore/platform/graphics/Image.h
    M Source/WebCore/platform/graphics/mac/controls/SwitchMac.mm
    M Source/WebCore/style/values/images/kinds/StyleCachedImage.h
    M Source/WebCore/style/values/images/kinds/StyleCanvasImage.h
    M Source/WebCore/style/values/images/kinds/StyleColorImage.h
    M Source/WebCore/style/values/images/kinds/StyleCrossfadeImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleCrossfadeImage.h
    M Source/WebCore/style/values/images/kinds/StyleFilterImage.h
    M Source/WebCore/style/values/images/kinds/StyleGradientImage.h
    M Source/WebCore/style/values/images/kinds/StyleImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleImage.h
    M Source/WebCore/style/values/images/kinds/StyleInvalidImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleInvalidImage.h
    M Source/WebCore/style/values/images/kinds/StyleMultiImage.cpp
    M Source/WebCore/style/values/images/kinds/StyleMultiImage.h
    M Source/WebCore/style/values/images/kinds/StyleNamedImage.h
    M Source/WebCore/style/values/images/kinds/StylePaintImage.h

  Log Message:
  -----------
  [Image Redux] Make Style::CrossfadeImage draw itself
https://bugs.webkit.org/show_bug.cgi?id=326266

Reviewed by Simon Fraser.

Moves cross-fade image drawing code from WebCore::CrossfadeGeneratedImage 
(which gets deleted) to Style::CrossfadeImage.

Also removes the last use of the virtual Style::Image::image() function, since 
the Style::CrossfadeImage can
keep both inputs as pure Style::Images now, so the declaration of 
Style::Image::image() can be removed and all
the subclasses are updated to remove `final` (since it is no longer virtual).

To avoid duplicating the math for mapping a source size, a helper was added, 
Style::Image::mapSourceToSize() to
implement it.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp: Removed.
* Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h: Removed.
* Source/WebCore/platform/graphics/Image.cpp:
* Source/WebCore/platform/graphics/Image.h:
* Source/WebCore/style/values/images/kinds/StyleCachedImage.h:
* Source/WebCore/style/values/images/kinds/StyleCanvasImage.h:
* Source/WebCore/style/values/images/kinds/StyleColorImage.h:
* Source/WebCore/style/values/images/kinds/StyleCrossfadeImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleCrossfadeImage.h:
* Source/WebCore/style/values/images/kinds/StyleFilterImage.h:
* Source/WebCore/style/values/images/kinds/StyleGradientImage.h:
* Source/WebCore/style/values/images/kinds/StyleImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleImage.h:
* Source/WebCore/style/values/images/kinds/StyleInvalidImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleInvalidImage.h:
* Source/WebCore/style/values/images/kinds/StyleMultiImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleMultiImage.h:
* Source/WebCore/style/values/images/kinds/StyleNamedImage.h:
* Source/WebCore/style/values/images/kinds/StylePaintImage.h:
* Source/WebCore/platform/graphics/mac/controls/SwitchMac.mm: Removes an old 
reference to CrossfadeGeneratedImage in a comment

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



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

Reply via email to