Title: [287286] trunk/Source/WebCore
Revision
287286
Author
[email protected]
Date
2021-12-20 16:24:53 -0800 (Mon, 20 Dec 2021)

Log Message

Don't include SVGImageForContainers in allCachedSVGImages
https://bugs.webkit.org/show_bug.cgi?id=234364

Patch by Matt Woodrow <[email protected]> on 2021-12-20
Reviewed by Dean Jackson.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::image const):
(WebCore::CachedImage::hasSVGImage const):
(WebCore::CachedImage::image): Deleted.
* loader/cache/CachedImage.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287285 => 287286)


--- trunk/Source/WebCore/ChangeLog	2021-12-21 00:22:03 UTC (rev 287285)
+++ trunk/Source/WebCore/ChangeLog	2021-12-21 00:24:53 UTC (rev 287286)
@@ -1,3 +1,16 @@
+2021-12-20  Matt Woodrow  <[email protected]>
+
+        Don't include SVGImageForContainers in allCachedSVGImages
+        https://bugs.webkit.org/show_bug.cgi?id=234364
+
+        Reviewed by Dean Jackson.
+
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::image const):
+        (WebCore::CachedImage::hasSVGImage const):
+        (WebCore::CachedImage::image): Deleted.
+        * loader/cache/CachedImage.h:
+
 2021-12-20  Wenson Hsieh  <[email protected]>
 
         Adopt ChromeClient::classifyModalContainerControls() in ModalContainerObserver

Modified: trunk/Source/WebCore/loader/cache/CachedImage.cpp (287285 => 287286)


--- trunk/Source/WebCore/loader/cache/CachedImage.cpp	2021-12-21 00:22:03 UTC (rev 287285)
+++ trunk/Source/WebCore/loader/cache/CachedImage.cpp	2021-12-21 00:24:53 UTC (rev 287286)
@@ -235,7 +235,7 @@
     return errorOccurred() && m_shouldPaintBrokenImage;
 }
 
-Image* CachedImage::image()
+Image* CachedImage::image() const
 {
     if (errorOccurred() && m_shouldPaintBrokenImage) {
         // Returning the 1x broken image is non-ideal, but we cannot reliably access the appropriate
@@ -272,7 +272,7 @@
 
 bool CachedImage::hasSVGImage() const
 {
-    return m_image && m_image->drawsSVGImage();
+    return image() && image()->isSVGImage();
 }
 
 void CachedImage::setContainerContextForClient(const CachedImageClient& client, const LayoutSize& containerSize, float containerZoom, const URL& imageURL)

Modified: trunk/Source/WebCore/loader/cache/CachedImage.h (287285 => 287286)


--- trunk/Source/WebCore/loader/cache/CachedImage.h	2021-12-21 00:22:03 UTC (rev 287285)
+++ trunk/Source/WebCore/loader/cache/CachedImage.h	2021-12-21 00:24:53 UTC (rev 287286)
@@ -53,7 +53,7 @@
     CachedImage(const URL&, Image*, PAL::SessionID, const CookieJar*, const String& domainForCachePartition);
     virtual ~CachedImage();
 
-    WEBCORE_EXPORT Image* image(); // Returns the nullImage() if the image is not available yet.
+    WEBCORE_EXPORT Image* image() const; // Returns the nullImage() if the image is not available yet.
     WEBCORE_EXPORT Image* imageForRenderer(const RenderObject*); // Returns the nullImage() if the image is not available yet.
     bool hasImage() const { return m_image.get(); }
     bool hasSVGImage() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to