Esempio n. 1
0
// TODO(yosin): We will make |SelectionInDOMTree| version of
// |setEndingSelection()| as primary function instead of wrapper.
void EditCommand::setEndingVisibleSelection(const VisibleSelection& selection) {
  for (EditCommand* command = this; command; command = command->m_parent) {
    if (EditCommandComposition* composition = compositionIfPossible(command)) {
      DCHECK(command->isTopLevelCommand());
      composition->setEndingSelection(selection);
    }
    command->m_endingSelection = selection;
  }
}
Esempio n. 2
0
void EditCommand::setEndingSelection(const VisibleSelection &s)
{
    for (EditCommand* cmd = this; cmd; cmd = cmd->m_parent) {
        if (EditCommandComposition* composition = compositionIfPossible(cmd)) {
            ASSERT(cmd->isTopLevelCommand());
            composition->setEndingSelection(s);
        }
        cmd->m_endingSelection = s;
    }
}
Esempio n. 3
0
void EditCommand::setStartingSelection(const VisibleSelection& selection) {
  for (EditCommand* command = this;; command = command->m_parent) {
    if (EditCommandComposition* composition = compositionIfPossible(command)) {
      DCHECK(command->isTopLevelCommand());
      composition->setStartingSelection(selection);
    }
    command->m_startingSelection = selection;
    if (!command->m_parent || command->m_parent->isFirstCommand(command))
      break;
  }
}
Esempio n. 4
0
void EditCommand::setStartingSelection(const VisibleSelection& s)
{
    for (EditCommand* cmd = this; ; cmd = cmd->m_parent) {
        if (EditCommandComposition* composition = compositionIfPossible(cmd)) {
            ASSERT(cmd->isTopLevelCommand());
            composition->setStartingSelection(s);
        }
        cmd->m_startingSelection = s;
        if (!cmd->m_parent || cmd->m_parent->isFirstCommand(cmd))
            break;
    }
}