Bug 1193349 - Part 2: Force a reload only when a source/img is really removed from a picture; r=jdm
MozReview-Commit-ID: 96ui8rQf4uz
This commit is contained in:
@@ -646,16 +646,6 @@ HTMLImageElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
}
|
||||
}
|
||||
|
||||
if (GetParent() &&
|
||||
GetParent()->IsHTMLElement(nsGkAtoms::picture) &&
|
||||
HTMLPictureElement::IsPictureEnabled()) {
|
||||
// Being removed from picture re-triggers selection, even if we
|
||||
// weren't using a <source> peer
|
||||
if (aNullParent) {
|
||||
QueueImageLoadTask(true);
|
||||
}
|
||||
}
|
||||
|
||||
nsImageLoadingContent::UnbindFromTree(aDeep, aNullParent);
|
||||
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
|
||||
}
|
||||
@@ -1084,6 +1074,10 @@ HTMLImageElement::PictureSourceRemoved(nsIContent *aSourceNode)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(aSourceNode == this ||
|
||||
IsPreviousSibling(aSourceNode, this),
|
||||
"Should not be getting notifications for non-previous-siblings");
|
||||
|
||||
QueueImageLoadTask(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user