Summary: | ImageLoader can still dispatch beforeload events for ImageDocuments | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vicki Pfau <jeffrey+webkit> | ||||||
Component: | Page Loading | Assignee: | Vicki Pfau <jeffrey+webkit> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | beidson, japhet, mjs, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Vicki Pfau
2012-05-16 11:16:18 PDT
Created attachment 142322 [details]
Patch
Comment on attachment 142322 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=142322&action=review > Source/WebCore/loader/ImageLoader.cpp:198 > - m_hasPendingBeforeLoadEvent = newImage; > + if (!m_element->document()->isImageDocument()) > + m_hasPendingBeforeLoadEvent = newImage; I would consider forcing m_hasPendingBeforeLoadEvent to false for image documents, and make sure whatever other bits of related data are set appropriately (if any) (In reply to comment #2) > (From update of attachment 142322 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=142322&action=review > > > Source/WebCore/loader/ImageLoader.cpp:198 > > - m_hasPendingBeforeLoadEvent = newImage; > > + if (!m_element->document()->isImageDocument()) > > + m_hasPendingBeforeLoadEvent = newImage; > > I would consider forcing m_hasPendingBeforeLoadEvent to false for image documents, and make sure whatever other bits of related data are set appropriately (if any) I'm not sure that's necessary, but I suppose it is nice to be explicit. The only associated bit seems to be regarding queuing of events in the event sender--which we don't do in this case anyway, so that's fine. I'll upload a version with the flag set explicitly. Created attachment 142332 [details]
Patch
Comment on attachment 142332 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=142332&action=review > Source/WebCore/ChangeLog:12 > + > + Prevent flags regarding sending beforeload events from being set on ImageDocuments. > + > + No new tests. > + Might want to reiterate the same reason why not from the last change. Committed r117336: <http://trac.webkit.org/changeset/117336> |