Wandering around our codebase, I discovered nsGenericDOMDataNode::IsOnlyWhitespace(). I think we can use this to implement nsIDOM3Text::isElementContentWhitespace(). Taking.
<WeirdAl> http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Text3-isElementContentWhitespace - the way it's written, I think the intent was to say "Does this text node contain only whitespace?" <sicking> no, it's pretty clear that it's not as simple as that Unfortunately, it's not so clear what it *does* mean. As I misinterpreted the spec, I'm assigning to the default owner.
You may want to look at the patch in bug 283861, which is probably bitrotted; eventually, either this or that bug should be duped there.
*** This bug has been marked as a duplicate of 283861 ***