mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Backed out changeset 58541e1f52d2 (bug 1007743)
This commit is contained in:
parent
e4e5a0e568
commit
2e97d854e8
@ -190,8 +190,8 @@ ExplicitChildIterator::Get()
|
||||
MOZ_ASSERT(!mIsFirst);
|
||||
|
||||
if (mIndexInInserted) {
|
||||
MatchedNodes assignedChildren = GetMatchedNodesForPoint(mChild);
|
||||
return assignedChildren[mIndexInInserted - 1];
|
||||
XBLChildrenElement* point = static_cast<XBLChildrenElement*>(mChild);
|
||||
return point->mInsertedChildren[mIndexInInserted - 1];
|
||||
} else if (mShadowIterator) {
|
||||
return mShadowIterator->Get();
|
||||
}
|
||||
|
@ -153,33 +153,14 @@ nsIContent::FindFirstNonChromeOnlyAccessContent() const
|
||||
nsIContent*
|
||||
nsIContent::GetFlattenedTreeParent() const
|
||||
{
|
||||
nsIContent* parent = nullptr;
|
||||
|
||||
nsTArray<nsIContent*>* destInsertionPoints = GetExistingDestInsertionPoints();
|
||||
if (destInsertionPoints && !destInsertionPoints->IsEmpty()) {
|
||||
// This node was distributed into an insertion point. The last node in
|
||||
// the list of destination insertion insertion points is where this node
|
||||
// appears in the composed tree (see Shadow DOM spec).
|
||||
nsIContent* lastInsertionPoint = destInsertionPoints->LastElement();
|
||||
parent = lastInsertionPoint->GetParent();
|
||||
} else if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
|
||||
parent = GetXBLInsertionParent();
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = GetParent();
|
||||
}
|
||||
|
||||
// Shadow roots never shows up in the flattened tree. Return the host
|
||||
// instead.
|
||||
if (parent && parent->HasFlag(NODE_IS_IN_SHADOW_TREE)) {
|
||||
ShadowRoot* parentShadowRoot = ShadowRoot::FromNode(parent);
|
||||
if (parentShadowRoot) {
|
||||
return parentShadowRoot->GetHost();
|
||||
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
|
||||
nsIContent* parent = GetXBLInsertionParent();
|
||||
if (parent) {
|
||||
return parent;
|
||||
}
|
||||
}
|
||||
|
||||
return parent;
|
||||
return GetParent();
|
||||
}
|
||||
|
||||
nsIContent::IMEState
|
||||
|
@ -12,4 +12,3 @@ pref(dom.webcomponents.enabled,true) == remove-insertion-point-1.html remove-ins
|
||||
pref(dom.webcomponents.enabled,true) == nested-insertion-point-1.html nested-insertion-point-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) == basic-shadow-element-1.html basic-shadow-element-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) == nested-shadow-element-1.html nested-shadow-element-1-ref.html
|
||||
pref(dom.webcomponents.enabled,true) == update-dist-node-descendants-1.html update-dist-node-descendants-1-ref.html
|
||||
|
@ -1,8 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
<div><div><span>Hello World</span></div></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="outer"><span id="distnode">Change me</span></div>
|
||||
<script>
|
||||
var shadowRoot = document.getElementById('outer').createShadowRoot();
|
||||
shadowRoot.innerHTML = '<div><content></content></div>';
|
||||
|
||||
function tweak() {
|
||||
var distNode = document.getElementById("distnode");
|
||||
distNode.textContent = "Hello World";
|
||||
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", tweak);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user