Bug 1332956 part 3. Implement the same behavior for <object>-inside-<object> and <object>-inside-mediaelement as we do for <embed> already. r=qdot
This commit is contained in:
@@ -79,7 +79,7 @@ HTMLObjectElement::DoneAddingChildren(bool aHaveNotified)
|
||||
// If we're already in a document, we need to trigger the load
|
||||
// Otherwise, BindToTree takes care of that.
|
||||
if (IsInComposedDoc()) {
|
||||
StartObjectLoad(aHaveNotified);
|
||||
StartObjectLoad(aHaveNotified, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +310,8 @@ HTMLObjectElement::SetAttr(int32_t aNameSpaceID, nsIAtom *aName,
|
||||
// a document, just in case that the caller wants to set additional
|
||||
// attributes before inserting the node into the document.
|
||||
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
|
||||
aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::data) {
|
||||
aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::data &&
|
||||
!BlockEmbedOrObjectContentLoading()) {
|
||||
return LoadObject(aNotify, true);
|
||||
}
|
||||
|
||||
@@ -327,7 +328,8 @@ HTMLObjectElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
|
||||
|
||||
// See comment in SetAttr
|
||||
if (aNotify && IsInComposedDoc() && mIsDoneAddingChildren &&
|
||||
aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::data) {
|
||||
aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::data &&
|
||||
!BlockEmbedOrObjectContentLoading()) {
|
||||
return LoadObject(aNotify, true);
|
||||
}
|
||||
|
||||
@@ -535,15 +537,16 @@ HTMLObjectElement::GetAttributeMappingFunction() const
|
||||
}
|
||||
|
||||
void
|
||||
HTMLObjectElement::StartObjectLoad(bool aNotify)
|
||||
HTMLObjectElement::StartObjectLoad(bool aNotify, bool aForce)
|
||||
{
|
||||
// BindToTree can call us asynchronously, and we may be removed from the tree
|
||||
// in the interim
|
||||
if (!IsInComposedDoc() || !OwnerDoc()->IsActive()) {
|
||||
if (!IsInComposedDoc() || !OwnerDoc()->IsActive() ||
|
||||
BlockEmbedOrObjectContentLoading()) {
|
||||
return;
|
||||
}
|
||||
|
||||
LoadObject(aNotify);
|
||||
LoadObject(aNotify, aForce);
|
||||
SetIsNetworkCreated(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user