-
tsepez@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=96301 Reviewed by Abhishek Arya. Source/WebCore: Same problem as in https://bugs.webkit.org/show_bug.cgi?id=90801. We can't clear the image loader when the src attribute is cleared, because we might be inside a handler called on top of an image loader event dispatch. Instead we will rely on the OwnPtr relationship between the Element and the Image Loader to limit the lifetime of the loader to that of the element. Test: fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::parseAttribute): Remove permature clearing of m_imageLoader. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseAttribute): Remove permature clearing of m_imageLoader. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseAttribute): Remove permature clearing of m_imageLoader. LayoutTests: Added test case. * fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt: Added. * fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ccd1e0c0