зеркало из https://github.com/mozilla/gecko-dev.git
Bug 125082 - use GetChildren in inDOMUtils and inDeepTreeWalker to get native anonymous content, too. r=roc
This commit is contained in:
Родитель
eeb5fc7207
Коммит
9328549062
|
@ -132,14 +132,7 @@ inDOMUtils::GetChildrenForNode(nsIDOMNode* aNode,
|
|||
if (aShowingAnonymousContent) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content) {
|
||||
nsRefPtr<nsBindingManager> bindingManager =
|
||||
inLayoutUtils::GetBindingManagerFor(aNode);
|
||||
if (bindingManager) {
|
||||
bindingManager->GetAnonymousNodesFor(content, getter_AddRefs(kids));
|
||||
if (!kids) {
|
||||
bindingManager->GetContentListFor(content, getter_AddRefs(kids));
|
||||
}
|
||||
}
|
||||
kids = content->GetChildren(nsIContent::eAllChildren);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -337,19 +337,13 @@ inDeepTreeWalker::PushNode(nsIDOMNode* aNode)
|
|||
}
|
||||
|
||||
if (!kids) {
|
||||
if (mShowAnonymousContent) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
nsRefPtr<nsBindingManager> bindingManager;
|
||||
if (content &&
|
||||
(bindingManager = inLayoutUtils::GetBindingManagerFor(aNode))) {
|
||||
bindingManager->GetAnonymousNodesFor(content, getter_AddRefs(kids));
|
||||
if (!kids)
|
||||
bindingManager->GetContentListFor(content, getter_AddRefs(kids));
|
||||
} else {
|
||||
aNode->GetChildNodes(getter_AddRefs(kids));
|
||||
}
|
||||
} else
|
||||
aNode->GetChildNodes(getter_AddRefs(kids));
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content && mShowAnonymousContent) {
|
||||
kids = content->GetChildren(nsIContent::eAllChildren);
|
||||
}
|
||||
}
|
||||
if (!kids) {
|
||||
aNode->GetChildNodes(getter_AddRefs(kids));
|
||||
}
|
||||
|
||||
item.kids = kids;
|
||||
|
|
Загрузка…
Ссылка в новой задаче