зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1669933, bug 1682159
) because failures were not from wptsync , for failing print reftest animations-print.html CLOSED TREE
Backed out changeset 7e9cf639b261 (bug 1669933)
Backed out changeset bee3e0399e0d (bug 1682159
)
This commit is contained in:
Родитель
d24e073b75
Коммит
78271aa3ec
|
@ -3170,35 +3170,6 @@ nsresult Element::CopyInnerTo(Element* aDst, ReparseAttributes aReparse) {
|
|||
}
|
||||
}
|
||||
|
||||
dom::NodeInfo* dstNodeInfo = aDst->NodeInfo();
|
||||
if (CustomElementData* data = GetCustomElementData()) {
|
||||
// The cloned node may be a custom element that may require
|
||||
// enqueing upgrade reaction.
|
||||
if (nsAtom* typeAtom = data->GetCustomElementType()) {
|
||||
aDst->SetCustomElementData(new CustomElementData(typeAtom));
|
||||
MOZ_ASSERT(dstNodeInfo->NameAtom()->Equals(dstNodeInfo->LocalName()));
|
||||
CustomElementDefinition* definition =
|
||||
nsContentUtils::LookupCustomElementDefinition(
|
||||
dstNodeInfo->GetDocument(), dstNodeInfo->NameAtom(),
|
||||
dstNodeInfo->NamespaceID(), typeAtom);
|
||||
if (definition) {
|
||||
nsContentUtils::EnqueueUpgradeReaction(aDst, definition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dstNodeInfo->GetDocument()->IsStaticDocument()) {
|
||||
// Clone any animations to the node in the static document, including the
|
||||
// current timing. They will need to be paused later after the new
|
||||
// document's pres shell gets initialized.
|
||||
aDst->CloneAnimationsFrom(*this);
|
||||
|
||||
// Propagate :defined state to the static clone.
|
||||
if (State().HasState(NS_EVENT_STATE_DEFINED)) {
|
||||
aDst->SetDefined(true);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -3137,6 +3137,27 @@ already_AddRefed<nsINode> nsINode::CloneAndAdopt(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (clone->IsHTMLElement() || clone->IsXULElement()) {
|
||||
// The cloned node may be a custom element that may require
|
||||
// enqueing upgrade reaction.
|
||||
Element* cloneElem = clone->AsElement();
|
||||
CustomElementData* data = elem->GetCustomElementData();
|
||||
RefPtr<nsAtom> typeAtom = data ? data->GetCustomElementType() : nullptr;
|
||||
|
||||
if (typeAtom) {
|
||||
cloneElem->SetCustomElementData(new CustomElementData(typeAtom));
|
||||
|
||||
MOZ_ASSERT(nodeInfo->NameAtom()->Equals(nodeInfo->LocalName()));
|
||||
CustomElementDefinition* definition =
|
||||
nsContentUtils::LookupCustomElementDefinition(
|
||||
nodeInfo->GetDocument(), nodeInfo->NameAtom(),
|
||||
nodeInfo->NamespaceID(), typeAtom);
|
||||
if (definition) {
|
||||
nsContentUtils::EnqueueUpgradeReaction(cloneElem, definition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aParent) {
|
||||
// If we're cloning we need to insert the cloned children into the cloned
|
||||
// parent.
|
||||
|
@ -3308,6 +3329,20 @@ already_AddRefed<nsINode> nsINode::CloneAndAdopt(
|
|||
if (aDeep && aNode->IsElement()) {
|
||||
if (aClone) {
|
||||
if (nodeInfo->GetDocument()->IsStaticDocument()) {
|
||||
// Clone any animations to the node in the static document, including
|
||||
// the current timing. They will need to be paused later after the new
|
||||
// document's pres shell gets initialized.
|
||||
//
|
||||
// This might be a bit cleaner from Element::CopyInnerTo.
|
||||
clone->AsElement()->CloneAnimationsFrom(*aNode->AsElement());
|
||||
|
||||
// Propagate :defined state to the static clone. This needs to happen
|
||||
// here rather than in Element::CopyInnerTo because otherwise we might
|
||||
// clobber the custom element state above in this same function.
|
||||
if (aNode->AsElement()->State().HasState(NS_EVENT_STATE_DEFINED)) {
|
||||
clone->AsElement()->SetDefined(true);
|
||||
}
|
||||
|
||||
// Clone the Shadow DOM
|
||||
ShadowRoot* originalShadowRoot = aNode->AsElement()->GetShadowRoot();
|
||||
if (originalShadowRoot) {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[animations-print.html]
|
||||
expected: ERROR
|
Загрузка…
Ссылка в новой задаче