Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp |
| index 9d9ea95f5040feec7ebf9794627f590d1496fca5..895f85362053f54e8e70522cd7482b61b8774bca 100644 |
| --- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp |
| +++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp |
| @@ -42,7 +42,7 @@ Node* enclosingShadowHost(Node* node) |
| bool isEnclosedBy(const PositionInFlatTree& position, const Node& node) |
| { |
| - ASSERT(position.isNotNull()); |
| + DCHECK(position.isNotNull()); |
| Node* anchorNode = position.anchorNode(); |
| if (anchorNode == node) |
| return !position.isAfterAnchor() && !position.isBeforeAnchor(); |
| @@ -101,7 +101,7 @@ Position adjustPositionForEnd(const Position& currentPosition, Node* startContai |
| { |
| TreeScope& treeScope = startContainerNode->treeScope(); |
| - ASSERT(currentPosition.computeContainerNode()->treeScope() != treeScope); |
| + DCHECK(currentPosition.computeContainerNode()->treeScope() != treeScope); |
| if (Node* ancestor = treeScope.ancestorInThisScope(currentPosition.computeContainerNode())) { |
| if (ancestor->contains(startContainerNode)) |
| @@ -135,7 +135,7 @@ Position adjustPositionForStart(const Position& currentPosition, Node* endContai |
| { |
| TreeScope& treeScope = endContainerNode->treeScope(); |
| - ASSERT(currentPosition.computeContainerNode()->treeScope() != treeScope); |
| + DCHECK(currentPosition.computeContainerNode()->treeScope() == treeScope); |
|
yosin_UTC9
2016/04/12 01:45:23
s/==/!=/
This is the reason of webkit_unit_tests
kotenkov
2016/04/12 06:05:24
Thanks for catching this!
|
| if (Node* ancestor = treeScope.ancestorInThisScope(currentPosition.computeContainerNode())) { |
| if (ancestor->contains(endContainerNode)) |
| @@ -231,10 +231,10 @@ void SelectionAdjuster::adjustSelectionInDOMTree(VisibleSelection* selection, co |
| void SelectionAdjuster::adjustSelectionToAvoidCrossingShadowBoundaries(VisibleSelection* selection) |
| { |
| // Note: |m_selectionType| isn't computed yet. |
| - ASSERT(selection->base().isNotNull()); |
| - ASSERT(selection->extent().isNotNull()); |
| - ASSERT(selection->start().isNotNull()); |
| - ASSERT(selection->end().isNotNull()); |
| + DCHECK(selection->base().isNotNull()); |
| + DCHECK(selection->extent().isNotNull()); |
| + DCHECK(selection->start().isNotNull()); |
| + DCHECK(selection->end().isNotNull()); |
| // TODO(hajimehoshi): Checking treeScope is wrong when a node is |
| // distributed, but we leave it as it is for backward compatibility. |