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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleUnits.cpp

Issue 2372903003: Ensure valid VisiblePosition input for inSameBlock (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
index d5e2463f6bc0514c384c714ae2689d8ed1eaef36..5a9dda91338e369e5a20e3c4d6e43df14c3f4b9e 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -1923,8 +1923,8 @@ VisiblePosition endOfBlock(const VisiblePosition& visiblePosition, EditingBounda
bool inSameBlock(const VisiblePosition& a, const VisiblePosition& b)
{
- // TODO(xiaochengh): Ensure that this function is called with valid |a| and
- // |b|, and add |DCHECK(a.isValid())| and |DCHECK(b.isValid())|
+ DCHECK(a.isValid()) << a;
+ DCHECK(b.isValid()) << b;
return !a.isNull() && enclosingBlock(a.deepEquivalent().computeContainerNode()) == enclosingBlock(b.deepEquivalent().computeContainerNode());
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698