We should use ToCharacterData(node)->length() instead of Node::MaxCharacterOffset() to avoid to use indirection call.
Because of default implementation of Node::MaxCharacterOffset() = NOTREACEHD()
and all call sites call it for CharacterData. Hence, there are no good reasons
to use Node::MaxCharacterOffset().
Comment 1 by yuhong....@samsung.corp-partner.google.com
, Mar 26 2018