d nodes and
  // offsets, respectively."
  var originalStartNode = range.startContainer;
  var originalStartOffset = range.startOffset;
  var originalEndNode = range.endContainer;
  var originalEndOffset = range.endOffset;

  // "If original start node and original end node are the same, and they are
  // a Text, ProcessingInstruction, or Comment node:"
  if (range.startContainer == range.endContainer
  && (isText(range.startContainer)
  || range.startContainer.nodeType == Node.COMMENT_NODE
  || range.start