Bug 21781: WebCore::Settings should have a maximum decoded image size setting
[WebKit-https.git] / WebCore / ChangeLog
index a8abb2e..5253da5 100644 (file)
@@ -1,3 +1,27 @@
+2008-10-22  David Kilzer  <ddkilzer@apple.com>
+
+        Bug 21781: WebCore::Settings should have a maximum decoded image size setting
+
+        <https://bugs.webkit.org/show_bug.cgi?id=21781>
+
+        Reviewed by Antti.
+
+        No tests since there is no change in behavior.
+
+        * loader/CachedImage.cpp:
+        (WebCore::CachedImage::maximumDecodedImageSize): Added.  Returns
+        WebCore::Settings::maximumDecodedImageSize() or 0 on error.
+        (WebCore::CachedImage::data): Flag an error if the image being
+        loaded is too big.
+        * loader/CachedImage.h:
+        (WebCore::CachedImage::maximumDecodedImageSize): Added declaration.
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings): Initialize m_maximumDecodedImageSize
+        to the maximum value of size_t.
+        * page/Settings.h:
+        (WebCore::Settings::setMaximumDecodedImageSize): Added method.
+        (WebCore::Settings::maximumDecodedImageSize): Ditto.
+
 2008-10-22  Mike Pinkerton  <pinkerton@chromium.org>
 
         Reviewed by Dan Bernstein.