| Index: Source/core/loader/ImageLoader.cpp
|
| diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
|
| index bf7b3a0ce781b3485083dea795eab0836bfdcd58..c453bd659cf307c920f1f4e9c48007836573bb90 100644
|
| --- a/Source/core/loader/ImageLoader.cpp
|
| +++ b/Source/core/loader/ImageLoader.cpp
|
| @@ -377,7 +377,7 @@ void ImageLoader::dispatchPendingBeforeLoadEvent()
|
| return;
|
| if (!m_image)
|
| return;
|
| - if (!m_element->document().attached())
|
| + if (!m_element->document().confusingAndOftenMisusedAttached())
|
| return;
|
| m_hasPendingBeforeLoadEvent = false;
|
| if (m_element->dispatchBeforeLoadEvent(m_image->url().string())) {
|
| @@ -407,7 +407,7 @@ void ImageLoader::dispatchPendingLoadEvent()
|
| if (!m_image)
|
| return;
|
| m_hasPendingLoadEvent = false;
|
| - if (element()->document().attached())
|
| + if (element()->document().confusingAndOftenMisusedAttached())
|
| dispatchLoadEvent();
|
|
|
| // Only consider updating the protection ref-count of the Element immediately before returning
|
| @@ -420,7 +420,7 @@ void ImageLoader::dispatchPendingErrorEvent()
|
| if (!m_hasPendingErrorEvent)
|
| return;
|
| m_hasPendingErrorEvent = false;
|
| - if (element()->document().attached())
|
| + if (element()->document().confusingAndOftenMisusedAttached())
|
| element()->dispatchEvent(Event::create(eventNames().errorEvent));
|
|
|
| // Only consider updating the protection ref-count of the Element immediately before returning
|
|
|