Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5c4f290c0ca0638bae3d718b4b9eb6645aeff5c
https://github.com/WebKit/WebKit/commit/e5c4f290c0ca0638bae3d718b4b9eb6645aeff5c
Author: Sam Weinig <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/loader/cache/CachedImage.cpp
M Source/WebCore/loader/cache/CachedImage.h
M Source/WebCore/page/DragController.cpp
M Source/WebCore/platform/Cursor.cpp
M Source/WebCore/platform/Cursor.h
M Source/WebCore/platform/graphics/BitmapImage.h
M Source/WebCore/platform/graphics/Image.cpp
M Source/WebCore/platform/graphics/Image.h
M Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
M Source/WebCore/platform/win/CursorWin.cpp
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp
M Source/WebCore/style/values/images/kinds/StyleCanvasImage.cpp
M Source/WebCore/svg/SVGFEImageElement.cpp
M Source/WebCore/svg/graphics/SVGImage.h
M Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm
Log Message:
-----------
[Image Redux] Replace Image::isNull() with a virtual
Image::hasSomethingToDraw()
https://bugs.webkit.org/show_bug.cgi?id=326613
Reviewed by Darin Adler.
The real goal of this change is to get rid of another use of the virtual
Image::size() function, which
can't give accurate answers for SVG images. Image::isNull() was implemented as
size().isEmpty(). One
option was to make Image::isNull() virtual, and have each subtype implement it,
but isNull() isn't a
great name, and what callers really want to know is if the image has anything
to draw. So, instead,
Image::isNull() is replaced by a new virtual function,
Image::hasSomethingToDraw() and the callers are
all updated.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
* Source/WebCore/html/ImageBitmap.cpp:
* Source/WebCore/loader/cache/CachedImage.cpp:
* Source/WebCore/loader/cache/CachedImage.h:
* Source/WebCore/page/DragController.cpp:
* Source/WebCore/platform/Cursor.cpp:
* Source/WebCore/platform/Cursor.h:
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/Image.cpp:
* Source/WebCore/platform/graphics/Image.h:
* Source/WebCore/platform/graphics/cg/PDFDocumentImage.h:
* Source/WebCore/platform/win/CursorWin.cpp:
* Source/WebCore/rendering/RenderImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp:
* Source/WebCore/style/values/images/kinds/StyleCanvasImage.cpp:
* Source/WebCore/svg/SVGFEImageElement.cpp:
* Source/WebCore/svg/graphics/SVGImage.h:
* Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm:
Canonical link: https://commits.webkit.org/322969@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications