RESOLVED FIXED 21781
WebCore::Settings should have a maximum decoded image size setting
https://bugs.webkit.org/show_bug.cgi?id=21781
Summary WebCore::Settings should have a maximum decoded image size setting
David Kilzer (:ddkilzer)
Reported 2008-10-21 19:14:05 PDT
* SUMMARY It would be nice for WebCore::Settings to have a maximum image size setting to limit the size of images on some platforms.
Attachments
Patch v1 (6.46 KB, patch)
2008-10-21 19:19 PDT, David Kilzer (:ddkilzer)
koivisto: review+
David Kilzer (:ddkilzer)
Comment 1 2008-10-21 19:19:15 PDT
Created attachment 24549 [details] Patch v1
Antti Koivisto
Comment 2 2008-10-22 12:17:47 PDT
Comment on attachment 24549 [details] Patch v1 r=me, with some comments. + frame = docLoader() ? docLoader()->frame() : 0; + DocLoader* docLoader() const { return m_docLoader; } + The CachedResource::m_docLoader is non-zero only in some special cases (it should have a better name). Using m_request->docLoader() covers all cases we care about. These changes are probably not needed. // FIXME: I'm not convinced this case can even be hit. I guess this FIXME can go now. We clearly can hit this case when maxImageSize is limited (plus it was not true even before). + void setMaximumImageSize(size_t size) { m_maximumImageSize = size; } + size_t maximumImageSize() const { return m_maximumImageSize; } How about maximumDecodedImageSize to avoid confusion between encoded and decoded size?
David Kilzer (:ddkilzer)
Comment 3 2008-10-22 19:53:20 PDT
Committed r37803
David Kilzer (:ddkilzer)
Comment 4 2008-10-22 19:54:09 PDT
(In reply to comment #2) > (From update of attachment 24549 [details] [edit]) > r=me, with some comments. I made all of these recommended changes before landing. http://trac.webkit.org/changeset/37803
Note You need to log in before you can comment on or make changes to this bug.