Title: [287631] branches/safari-612-branch/Source/WebCore
Revision
287631
Author
repst...@apple.com
Date
2022-01-05 10:21:18 -0800 (Wed, 05 Jan 2022)

Log Message

Cherry-pick r287286. rdar://problem/87124952

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

    Patch by Matt Woodrow <mattwood...@apple.com> 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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (287630 => 287631)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2022-01-05 18:21:14 UTC (rev 287630)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2022-01-05 18:21:18 UTC (rev 287631)
@@ -1,5 +1,36 @@
 2022-01-05  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r287286. rdar://problem/87124952
+
+    Don't include SVGImageForContainers in allCachedSVGImages
+    https://bugs.webkit.org/show_bug.cgi?id=234364
+    
+    Patch by Matt Woodrow <mattwood...@apple.com> 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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-12-20  Matt Woodrow  <mattwood...@apple.com>
+
+            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:
+
+2022-01-05  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r287240. rdar://problem/86026618
 
     Fix pointer to blob data in BlobResourceHandle::readDataSync()

Modified: branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.cpp (287630 => 287631)


--- branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.cpp	2022-01-05 18:21:14 UTC (rev 287630)
+++ branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.cpp	2022-01-05 18:21:18 UTC (rev 287631)
@@ -234,7 +234,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
@@ -271,7 +271,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: branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.h (287630 => 287631)


--- branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.h	2022-01-05 18:21:14 UTC (rev 287630)
+++ branches/safari-612-branch/Source/WebCore/loader/cache/CachedImage.h	2022-01-05 18:21:18 UTC (rev 287631)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to