Bug 21781: WebCore::Settings should have a maximum decoded image size setting
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2008 02:53:02 +0000 (02:53 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2008 02:53:02 +0000 (02:53 +0000)
commit8e9dd7034fa788ab96dd88036f4129b44d23eaad
tree6b1692c3f34fdc72b37b3333d857fe547f236fe7
parent0bfdd23eea6d5bfd9724e951af435a2cfcf0b758
    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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/CachedImage.cpp
WebCore/loader/CachedImage.h
WebCore/loader/CachedResource.h
WebCore/page/Settings.cpp
WebCore/page/Settings.h