Bug 1053629 - Reduce complexity of setTextContent