Backed out changeset 58541e1f52d2 (bug 1007743)

This commit is contained in:
Carsten "Tomcat" Book 2014-06-04 08:55:33 +02:00
parent e4e5a0e568
commit 2e97d854e8
5 changed files with 7 additions and 56 deletions

View File

@ -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();
}

View File

@ -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

View File

@ -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

View File

@ -1,8 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<div>
<div><div><span>Hello World</span></div></div>
</div>
</body>
</html>

View File

@ -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>