[webkit-reviews] review granted: [Bug 128043] Remove CachedImageManual class : [Attachment 222883] Patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 1 21:23:47 PST 2014
Darin Adler <darin at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 128043: Remove CachedImageManual class
https://bugs.webkit.org/show_bug.cgi?id=128043
Attachment 222883: Patch v1
https://bugs.webkit.org/attachment.cgi?id=222883&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=222883&action=review
> Source/WebCore/loader/cache/CachedImage.cpp:100
> +#if USE(CG)
> + if (UNLIKELY(isManuallyCached())) {
> + // Use the incoming URL in the response field. This ensures that
code
> + // using the response directly, such as origin checks for security,
> + // actually see something.
> + m_response.setURL(url);
> + }
> +#endif
I’m not sure I understand why the manually cached flag is unconditional, but
this code is CG-only. I’d expect the two to be consistent. If ManuallyCached is
temporarily not yet used in non-CG configurations, this code would still do no
harm.
> Source/WebCore/loader/cache/CachedImage.cpp:627
> +// FIXME: Remove the USE(CG) once we make MemoryCache::addImageToCache()
platform-independent.
Why do we have to wait? I don’t see any harm in making this code unconditional
even if isManuallyCached() is going to be always false on platforms that have
MemoryCache::addImageToCache() yet.
> Source/WebCore/loader/cache/CachedImage.h:85
> +#if USE(CG)
> + // FIXME: Remove the USE(CG) once we make MemoryCache::addImageToCache()
platform-independent.
Same comment as above. Doesn’t seem that this needs to be conditional. Of if we
do want it conditional, then the data member should also be conditional.
> Source/WebCore/loader/cache/CachedImage.h:150
> + unsigned char m_isManuallyCached : 1;
> + unsigned char m_shouldPaintBrokenImage : 1;
Why unsigned char instead of unsigned for these bit fields?
More information about the webkit-reviews
mailing list