if ((node->isTextNode() && static_cast<int>(next) <= node->maxCharacterOffset()) || (node->renderer() && node->renderer()->isBR() && !next))
// The next variable contains a usable index into a text node
return VisiblePosition(createLegacyEditingPosition(node, next), DOWNSTREAM);
// Use the character iterator to translate the next value into a DOM position.
if ((node->isTextNode() && static_cast<int>(next) <= node->maxCharacterOffset()) || (node->renderer() && node->renderer()->isBR() && !next))
// The next variable contains a usable index into a text node
return VisiblePosition(createLegacyEditingPosition(node, next), DOWNSTREAM);
// Use the character iterator to translate the next value into a DOM position.