Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| index 3cab342b3b0c8b37f31852244d68f386d24f666d..191826b354745d5833b0d9fe1cc82cdb00c8d35c 100644 |
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| @@ -164,7 +164,6 @@ void DocumentMarkerController::RemoveMarkers( |
| for (; !marked_text.AtEnd(); marked_text.Advance()) { |
| if (!PossiblyHasMarkers(marker_types)) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
|
yosin_UTC9
2017/05/18 04:29:08
Rather than removing DCHECK, how about changing Po
|
| int start_offset = marked_text.StartOffsetInCurrentContainer(); |
| int end_offset = marked_text.EndOffsetInCurrentContainer(); |
| @@ -245,7 +244,6 @@ void DocumentMarkerController::MoveMarkers(Node* src_node, |
| if (!PossiblyHasMarkers(DocumentMarker::AllMarkers())) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
| MarkerLists* src_markers = markers_.at(src_node); |
| if (!src_markers) |
| @@ -288,7 +286,6 @@ void DocumentMarkerController::RemoveMarkersInternal( |
| if (!PossiblyHasMarkers(marker_types)) |
| return; |
| - DCHECK(!(markers_.IsEmpty())); |
| MarkerLists* markers = markers_.at(node); |
| if (!markers) |
| @@ -396,7 +393,6 @@ Vector<IntRect> DocumentMarkerController::RenderedRectsForMarkers( |
| if (!PossiblyHasMarkers(marker_type)) |
| return result; |
| - DCHECK(!(markers_.IsEmpty())); |
| // outer loop: process each node |
| MarkerMap::iterator end = markers_.end(); |
| @@ -485,7 +481,6 @@ void DocumentMarkerController::RemoveMarkersForNode( |
| DocumentMarker::MarkerTypes marker_types) { |
| if (!PossiblyHasMarkers(marker_types)) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
| MarkerMap::iterator iterator = markers_.find(node); |
| if (iterator != markers_.end()) |
| @@ -514,7 +509,6 @@ void DocumentMarkerController::RemoveMarkersOfTypes( |
| DocumentMarker::MarkerTypes marker_types) { |
| if (!PossiblyHasMarkers(marker_types)) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
| HeapVector<Member<const Node>> nodes_with_markers; |
| CopyKeysToVector(markers_, nodes_with_markers); |
| @@ -581,7 +575,6 @@ void DocumentMarkerController::RepaintMarkers( |
| DocumentMarker::MarkerTypes marker_types) { |
| if (!PossiblyHasMarkers(marker_types)) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
| // outer loop: process each markered node in the document |
| MarkerMap::iterator end = markers_.end(); |
| @@ -610,8 +603,6 @@ bool DocumentMarkerController::SetMarkersActive(const EphemeralRange& range, |
| if (!PossiblyHasMarkers(DocumentMarker::AllMarkers())) |
| return false; |
| - DCHECK(!markers_.IsEmpty()); |
| - |
| Node* const start_container = range.StartPosition().ComputeContainerNode(); |
| DCHECK(start_container); |
| Node* const end_container = range.EndPosition().ComputeContainerNode(); |
| @@ -713,7 +704,6 @@ void DocumentMarkerController::DidUpdateCharacterData(CharacterData* node, |
| unsigned new_length) { |
| if (!PossiblyHasMarkers(DocumentMarker::AllMarkers())) |
| return; |
| - DCHECK(!markers_.IsEmpty()); |
| MarkerLists* markers = markers_.at(node); |
| if (!markers) |