WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Aug 2007 00:47:11 +0000 (00:47 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Aug 2007 00:47:11 +0000 (00:47 +0000)
commit3977951dc46cc21bbf56689e7e3fc3238cc4ecc3
tree5fd70a2427b297d55d9b83338bf2b15549f32de9
parent3a690e9f9d762cbc3476ed185d270aec0fc8c232
WebCore:

        Reviewed by Geoff.

        <rdar://problem/5430165>
        REGRESSION: Dynamically loaded images fail to load

        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::HTMLImageLoader):
        Initialize the m_elementIsProtected member.

        (WebCore::HTMLImageLoader::~HTMLImageLoader):
        Assert that the element is not protected.

        (WebCore::HTMLImageLoader::setLoadingImage):
        If the image is not null, protect the element. Otherwise, unprotect it.

        (WebCore::HTMLImageLoader::dispatchLoadEvent):
        Unprotect the element here.

        (WebCore::HTMLImageLoader::protectElement):
        (WebCore::HTMLImageLoader::unprotectElement):
        New methods which protect and unprotect the element.

        * html/HTMLImageLoader.h:

LayoutTests:

        Reviewed by Geoff.

        <rdar://problem/5430165>
        REGRESSION: Dynamically loaded images fail to load

        * fast/dom/HTMLImageElement/image-loading-gc-expected.txt: Added.
        * fast/dom/HTMLImageElement/image-loading-gc.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLImageElement/image-loading-gc-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLImageElement/image-loading-gc.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLImageLoader.cpp
WebCore/html/HTMLImageLoader.h