Bug 1410895: Multiple cleanups on top. r=bz

MozReview-Commit-ID: GX3dfmWL083

--HG--
extra : rebase_source : 5ed1b625356d7f561559747fae30f2342459538a
This commit is contained in:
Emilio Cobos Álvarez 2017-10-23 16:06:50 +02:00
Родитель 273bc65bb1
Коммит 3f918ff3a0
3 изменённых файлов: 11 добавлений и 22 удалений

Просмотреть файл

@ -206,7 +206,7 @@ nsIContent::GetFlattenedTreeParentNodeInternal(FlattenedParentType aType) const
}
}
if (parent && nsContentUtils::HasDistributedChildren(parent) &&
if (nsContentUtils::HasDistributedChildren(parent) &&
nsContentUtils::IsInSameAnonymousTree(parent, this)) {
// This node is distributed to insertion points, thus we
// need to consult the destination insertion points list to
@ -218,9 +218,9 @@ nsIContent::GetFlattenedTreeParentNodeInternal(FlattenedParentType aType) const
parent = destInsertionPoints && !destInsertionPoints->IsEmpty() ?
destInsertionPoints->LastElement()->GetParent() : nullptr;
} else if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
nsIContent* insertionParent = GetXBLInsertionParent();
if (insertionParent) {
parent = insertionParent;
if (nsIContent* insertionPoint = GetXBLInsertionPoint()) {
parent = insertionPoint->GetParent();
MOZ_ASSERT(parent);
}
}

Просмотреть файл

@ -4805,8 +4805,7 @@ nsContentUtils::HasMutationListeners(nsINode* aNode,
return false;
}
if (aNode->IsNodeOfType(nsINode::eCONTENT) &&
static_cast<nsIContent*>(aNode)->ChromeOnlyAccess()) {
if (aNode->IsContent() && aNode->AsContent()->ChromeOnlyAccess()) {
return false;
}
@ -4832,11 +4831,11 @@ nsContentUtils::HasMutationListeners(nsINode* aNode,
return true;
}
if (aNode->IsNodeOfType(nsINode::eCONTENT)) {
nsIContent* content = static_cast<nsIContent*>(aNode);
nsIContent* insertionParent = content->GetXBLInsertionParent();
if (insertionParent) {
aNode = insertionParent;
if (aNode->IsContent()) {
nsIContent* insertionPoint = aNode->AsContent()->GetXBLInsertionPoint();
if (insertionPoint) {
aNode = insertionPoint->GetParent();
MOZ_ASSERT(aNode);
continue;
}
}

Просмотреть файл

@ -7491,17 +7491,7 @@ nsCSSFrameConstructor::GetRangeInsertionPoint(nsIContent* aContainer,
return insertionPoint; // Don't build the frames.
}
bool hasInsertion = false;
if (!insertionPoint.mMultiple) {
// XXXbz XBL2/sXBL issue
nsIDocument* document = aStartChild->GetComposedDoc();
// XXXbz how would |document| be null here?
if (document && aStartChild->GetXBLInsertionParent()) {
hasInsertion = true;
}
}
if (insertionPoint.mMultiple || hasInsertion) {
if (insertionPoint.mMultiple || aStartChild->GetXBLInsertionPoint()) {
// We have an insertion point. There are some additional tests we need to do
// in order to ensure that an append is a safe operation.
uint32_t childCount = 0;