RESOLVED FIXED 142825
Refactor ImageLoader's setting of CachedImage
https://bugs.webkit.org/show_bug.cgi?id=142825
Summary Refactor ImageLoader's setting of CachedImage
Yoav Weiss
Reported 2015-03-18 08:15:14 PDT
Refactor ImageLoader's setting of CachedImage
Attachments
Patch (5.44 KB, patch)
2015-03-18 08:39 PDT, Yoav Weiss
no flags
Patch (5.44 KB, patch)
2015-03-18 09:52 PDT, Yoav Weiss
no flags
Patch (5.44 KB, patch)
2015-03-19 01:29 PDT, Yoav Weiss
no flags
Yoav Weiss
Comment 1 2015-03-18 08:39:27 PDT
Chris Dumez
Comment 2 2015-03-18 09:17:07 PDT
Comment on attachment 248932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248932&action=review r=me > Source/WebCore/ChangeLog:11 > + CachedImages and were not used as originalyl inteneded. That resulted in some dead code, "originally intended"
Chris Dumez
Comment 3 2015-03-18 09:26:48 PDT
Comment on attachment 248932 [details] Patch Please fix the typos.
Yoav Weiss
Comment 4 2015-03-18 09:52:49 PDT
Yoav Weiss
Comment 5 2015-03-18 09:55:23 PDT
Fixed the typo. Apologies for CQing it. I missed the comment due to conference WiFi slowness :/
Chris Dumez
Comment 6 2015-03-18 10:19:13 PDT
Comment on attachment 248941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248941&action=review > Source/WebCore/ChangeLog:11 > + CachedImages and were not used as originally inteneded. That resulted in some dead code, "intended". You fixed one out of 2 typos.
Yoav Weiss
Comment 7 2015-03-19 01:29:39 PDT
Yoav Weiss
Comment 8 2015-03-19 01:30:23 PDT
Comment on attachment 249025 [details] Patch Sorry about that. Fixed the second one as well.
Darin Adler
Comment 9 2015-03-19 08:08:00 PDT
Comment on attachment 249025 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249025&action=review > Source/WebCore/loader/ImageLoader.cpp:139 > + if (oldImage) { Can this instead be an early return? Is it important to call resetAnimation when m_image is null?
Yoav Weiss
Comment 10 2015-03-19 15:33:10 PDT
Comment on attachment 249025 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249025&action=review >> Source/WebCore/loader/ImageLoader.cpp:139 >> + if (oldImage) { > > Can this instead be an early return? Is it important to call resetAnimation when m_image is null? I'm not sure, TBH. Since resetAnimation is called on renderImageResource, which arrives from the element's renderer (so not necessarily null, and not related to m_image), it seems likely that we do need to reset any animations when setting the CachedImage to be null.
Yoav Weiss
Comment 11 2015-03-23 01:28:31 PDT
Comment on attachment 249025 [details] Patch Committing, but let me know if you think this can be further improved and I'll do that in a followup patch.
WebKit Commit Bot
Comment 12 2015-03-23 02:15:00 PDT
Comment on attachment 249025 [details] Patch Clearing flags on attachment: 249025 Committed r181849: <http://trac.webkit.org/changeset/181849>
WebKit Commit Bot
Comment 13 2015-03-23 02:15:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.