mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 471722 - Plaintext editor redo handling code looks for incorrect type of bogus node. r+sr=peterv
This commit is contained in:
parent
23cc36f9b8
commit
fd55a4bbd4
@ -1040,7 +1040,7 @@ nsTextEditRules::DidRedo(nsISelection *aSelection, nsresult aResult)
|
||||
if (!theRoot) return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMNodeList> nodeList;
|
||||
res = theRoot->GetElementsByTagName(NS_LITERAL_STRING("div"),
|
||||
res = theRoot->GetElementsByTagName(NS_LITERAL_STRING("br"),
|
||||
getter_AddRefs(nodeList));
|
||||
if (NS_FAILED(res)) return res;
|
||||
if (nodeList)
|
||||
@ -1048,7 +1048,7 @@ nsTextEditRules::DidRedo(nsISelection *aSelection, nsresult aResult)
|
||||
PRUint32 len;
|
||||
nodeList->GetLength(&len);
|
||||
|
||||
if (len != 1) return NS_OK; // only in the case of one div could there be the bogus node
|
||||
if (len != 1) return NS_OK; // only in the case of one br could there be the bogus node
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
nodeList->Item(0, getter_AddRefs(node));
|
||||
if (!node) return NS_ERROR_NULL_POINTER;
|
||||
|
Loading…
Reference in New Issue
Block a user