| Summary: | Refactor ImageLoader's setting of CachedImage | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yoav Weiss <yoav> | ||||||||
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, commit-queue, esprehn+autocc, gyuyoung.kim, japhet | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Yoav Weiss
2015-03-18 08:15:14 PDT
Created attachment 248932 [details]
Patch
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" Comment on attachment 248932 [details]
Patch
Please fix the typos.
Created attachment 248941 [details]
Patch
Fixed the typo. Apologies for CQing it. I missed the comment due to conference WiFi slowness :/ 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. Created attachment 249025 [details]
Patch
Comment on attachment 249025 [details]
Patch
Sorry about that. Fixed the second one as well.
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? 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. 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.
Comment on attachment 249025 [details] Patch Clearing flags on attachment: 249025 Committed r181849: <http://trac.webkit.org/changeset/181849> All reviewed patches have been landed. Closing bug. |