Index: Source/core/html/HTMLImageElement.cpp |
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp |
index 74e7d1350790183f293fd66801efb85ce4ee3ea6..fdcc1377b3da43fd9a22f065be524d57eff74b71 100644 |
--- a/Source/core/html/HTMLImageElement.cpp |
+++ b/Source/core/html/HTMLImageElement.cpp |
@@ -358,6 +358,9 @@ void HTMLImageElement::attach(const AttachContext& context) |
Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint) |
{ |
+ if (!document().isActive()) |
+ return InsertionDone; |
bzsolt
2014/10/16 13:01:36
This modification caused to fail a test (fast/dom/
Yoav Weiss
2014/10/16 13:27:17
I don't know that this is correct. There are a lot
|
+ |
if (!m_formWasSetByParser || NodeTraversal::highestAncestorOrSelf(*insertionPoint) != NodeTraversal::highestAncestorOrSelf(*m_form.get())) |
resetFormOwner(); |
if (m_listener) |
@@ -625,6 +628,9 @@ FloatSize HTMLImageElement::defaultDestinationSize() const |
void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior behavior) |
{ |
+ if (!document().isActive()) |
+ return; |
+ |
bool foundURL = false; |
if (RuntimeEnabledFeatures::pictureEnabled()) { |
ImageCandidate candidate = findBestFitImageFromPictureParent(); |