зеркало из https://github.com/mozilla/gecko-dev.git
Bug 535632 Crash [@ nsEditor::GetIndexOf] r=Olli
This commit is contained in:
Родитель
e3b3c7d3b1
Коммит
c29d6d178f
|
@ -4025,12 +4025,16 @@ nsEditor::IsTextNode(nsIDOMNode *aNode)
|
||||||
PRInt32
|
PRInt32
|
||||||
nsEditor::GetIndexOf(nsIDOMNode *parent, nsIDOMNode *child)
|
nsEditor::GetIndexOf(nsIDOMNode *parent, nsIDOMNode *child)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIContent> content = do_QueryInterface(parent);
|
nsCOMPtr<nsINode> parentNode = do_QueryInterface(parent);
|
||||||
|
NS_PRECONDITION(parentNode, "null parentNode in nsEditor::GetIndexOf");
|
||||||
|
NS_PRECONDITION(parentNode->IsNodeOfType(nsINode::eCONTENT) ||
|
||||||
|
parentNode->IsNodeOfType(nsINode::eDOCUMENT),
|
||||||
|
"The parent node must be an element node or a document node");
|
||||||
|
|
||||||
nsCOMPtr<nsIContent> cChild = do_QueryInterface(child);
|
nsCOMPtr<nsIContent> cChild = do_QueryInterface(child);
|
||||||
NS_PRECONDITION(content, "null content in nsEditor::GetIndexOf");
|
|
||||||
NS_PRECONDITION(cChild, "null content in nsEditor::GetIndexOf");
|
NS_PRECONDITION(cChild, "null content in nsEditor::GetIndexOf");
|
||||||
|
|
||||||
return content->IndexOf(cChild);
|
return parentNode->IndexOf(cChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<body xmlns="http://www.w3.org/1999/xhtml" style="margin: 200px;" contenteditable="true" onload="document.execCommand('outdent', false, null);" />
|
|
@ -12,3 +12,4 @@ load 448329-3.html
|
||||||
load 456727-1.html
|
load 456727-1.html
|
||||||
load 456727-2.html
|
load 456727-2.html
|
||||||
load 467647-1.html
|
load 467647-1.html
|
||||||
|
load 535632-1.xhtml
|
||||||
|
|
Загрузка…
Ссылка в новой задаче