mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
If one endpoint of a range is in anonymous content for a given bindingParent,
the other one must be too from now on. Incidentally improves performance on pages with lots of textfields. Bug 372086, r+sr=sicking
This commit is contained in:
parent
e873572a96
commit
498f885e86
@ -540,10 +540,18 @@ IsValidBoundary(nsINode* aNode)
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (aNode->IsNodeOfType(nsINode::eCONTENT) &&
|
||||
NS_STATIC_CAST(nsIContent*, aNode)->Tag() ==
|
||||
nsGkAtoms::documentTypeNodeName) {
|
||||
return nsnull;
|
||||
if (aNode->IsNodeOfType(nsINode::eCONTENT)) {
|
||||
nsIContent* content = NS_STATIC_CAST(nsIContent*, aNode);
|
||||
if (content->Tag() == nsGkAtoms::documentTypeNodeName) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// If the node has a binding parent, that should be the root.
|
||||
// XXXbz maybe only for native anonymous content?
|
||||
nsINode* root = content->GetBindingParent();
|
||||
if (root) {
|
||||
return root;
|
||||
}
|
||||
}
|
||||
|
||||
// Elements etc. must be in document or in document fragment,
|
||||
|
Loading…
Reference in New Issue
Block a user