Bug 1445396 - remove nsIDOMText use in chat. r=florian
This commit is contained in:
Родитель
931fca452f
Коммит
606716b810
|
@ -340,7 +340,8 @@ function cleanupNode(aNode, aRules, aTextModifiers)
|
|||
// If we are processing nodes created by one of the previous
|
||||
// text modifier function, some of the nodes are likely not
|
||||
// text node, skip them.
|
||||
if (!(textNode instanceof Ci.nsIDOMText))
|
||||
if (textNode.nodeType != textNode.TEXT_NODE &&
|
||||
textNode.nodeType != textNode.CDATA_SECTION_NODE)
|
||||
continue;
|
||||
|
||||
let result = modifier(textNode);
|
||||
|
|
|
@ -210,7 +210,8 @@ function smileNode(aNode)
|
|||
node.namespaceURI == "http://www.w3.org/1999/xhtml") {
|
||||
// we are on a tag, recurse to process its children
|
||||
smileNode(node);
|
||||
} else if (node instanceof Ci.nsIDOMText) {
|
||||
} else if (node.nodeType == node.TEXT_NODE ||
|
||||
node.nodeType == node.CDATA_SECTION_NODE) {
|
||||
// we are on a text node, process it
|
||||
smileTextNode(node);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче