Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStrategy.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/EditingStrategy.h" 5 #include "core/editing/EditingStrategy.h"
6 6
7 #include "core/editing/EditingUtilities.h" 7 #include "core/editing/EditingUtilities.h"
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 27 matching lines...) Expand all
38 38
39 template <typename Traversal> 39 template <typename Traversal>
40 bool EditingAlgorithm<Traversal>::editingIgnoresContent(const Node* node) 40 bool EditingAlgorithm<Traversal>::editingIgnoresContent(const Node* node)
41 { 41 {
42 return !node->canContainRangeEndPoint() || isEmptyNonEditableNodeInEditable( node); 42 return !node->canContainRangeEndPoint() || isEmptyNonEditableNodeInEditable( node);
43 } 43 }
44 44
45 template <typename Traversal> 45 template <typename Traversal>
46 int EditingAlgorithm<Traversal>::lastOffsetForEditing(const Node* node) 46 int EditingAlgorithm<Traversal>::lastOffsetForEditing(const Node* node)
47 { 47 {
48 ASSERT(node); 48 DCHECK(node);
49 if (!node) 49 if (!node)
50 return 0; 50 return 0;
51 if (node->offsetInCharacters()) 51 if (node->offsetInCharacters())
52 return node->maxCharacterOffset(); 52 return node->maxCharacterOffset();
53 53
54 if (Traversal::hasChildren(*node)) 54 if (Traversal::hasChildren(*node))
55 return Traversal::countChildren(*node); 55 return Traversal::countChildren(*node);
56 56
57 // FIXME: Try return 0 here. 57 // FIXME: Try return 0 here.
58 58
(...skipping 27 matching lines...) Expand all
86 candidateRoot = parent; 86 candidateRoot = parent;
87 parent = Strategy::parent(*candidateRoot); 87 parent = Strategy::parent(*candidateRoot);
88 } 88 }
89 return candidateRoot; 89 return candidateRoot;
90 } 90 }
91 91
92 template class CORE_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal>; 92 template class CORE_TEMPLATE_EXPORT EditingAlgorithm<NodeTraversal>;
93 template class CORE_TEMPLATE_EXPORT EditingAlgorithm<FlatTreeTraversal>; 93 template class CORE_TEMPLATE_EXPORT EditingAlgorithm<FlatTreeTraversal>;
94 94
95 } // namespace blink 95 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698