Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/commands/EditCommand.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp |
| index 0581ae6d82eb430280e91df1da815eb52037dced..ff15d6ff55d8b47c9e724fcad3277be290588170 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp |
| @@ -38,8 +38,8 @@ EditCommand::EditCommand(Document& document) |
| : m_document(&document) |
| , m_parent(nullptr) |
| { |
| - ASSERT(m_document); |
| - ASSERT(m_document->frame()); |
| + DCHECK(m_document); |
| + DCHECK(m_document->frame()); |
| setStartingSelection(m_document->frame()->selection().selection()); |
| setEndingSelection(m_startingSelection); |
| } |
| @@ -64,7 +64,7 @@ void EditCommand::setStartingSelection(const VisibleSelection& selection) |
| { |
| for (EditCommand* command = this; ; command = command->m_parent) { |
| if (EditCommandComposition* composition = compositionIfPossible(command)) { |
| - ASSERT(command->isTopLevelCommand()); |
| + DCHECK(command->isTopLevelCommand()); |
| composition->setStartingSelection(selection); |
| } |
| command->m_startingSelection = selection; |
| @@ -77,7 +77,7 @@ void EditCommand::setEndingSelection(const VisibleSelection& selection) |
| { |
| for (EditCommand* command = this; command; command = command->m_parent) { |
| if (EditCommandComposition* composition = compositionIfPossible(command)) { |
| - ASSERT(command->isTopLevelCommand()); |
| + DCHECK(command->isTopLevelCommand()); |
| composition->setEndingSelection(selection); |
| } |
| command->m_endingSelection = selection; |
| @@ -93,7 +93,7 @@ bool EditCommand::isRenderedCharacter(const Position& position) |
| { |
| if (position.isNull()) |
| return false; |
| - ASSERT(position.isOffsetInAnchor()); |
| + DCHECK(position.isOffsetInAnchor()); |
|
yosin_UTC9
2016/04/14 04:35:02
How about adding |<< position|?
|
| if (!position.anchorNode()->isTextNode()) |
| return false; |
| @@ -106,8 +106,8 @@ bool EditCommand::isRenderedCharacter(const Position& position) |
| void EditCommand::setParent(CompositeEditCommand* parent) |
| { |
| - ASSERT((parent && !m_parent) || (!parent && m_parent)); |
| - ASSERT(!parent || !isCompositeEditCommand() || !toCompositeEditCommand(this)->composition()); |
| + DCHECK((parent && !m_parent) || (!parent && m_parent)); |
| + DCHECK(!parent || !isCompositeEditCommand() || !toCompositeEditCommand(this)->composition()); |
| m_parent = parent; |
| if (parent) { |
| m_startingSelection = parent->m_endingSelection; |