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

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

Issue 2387963003: Temporarily remove a DCHECK from createVisibleSelection (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/VisibleSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
index 823902c2afb354da4cf4178c7138250daf97300d..b7d60c80862cec0920fd18f3d7fbd65cd336a873 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -224,7 +224,8 @@ VisibleSelection createVisibleSelection(const Position& base,
bool isDirectional) {
DCHECK(!needsLayoutTreeUpdate(base));
DCHECK(!needsLayoutTreeUpdate(extent));
- DCHECK(base.isNotNull() || extent.isNull());
+ // TODO(xiaochengh): We should check |base.isNotNull() || extent.isNull()|
+ // after all call sites have ensured that.
return VisibleSelection::create(base, extent, affinity, isDirectional);
}
@@ -247,7 +248,8 @@ VisibleSelection createVisibleSelection(const VisiblePosition& base,
bool isDirectional) {
DCHECK(base.isValid());
DCHECK(extent.isValid());
- DCHECK(base.isNotNull() || extent.isNull());
+ // TODO(xiaochengh): We should check |base.isNotNull() || extent.isNull()|
+ // after all call sites have ensured that.
return VisibleSelection::create(base.deepEquivalent(),
extent.deepEquivalent(), base.affinity(),
isDirectional);
@@ -276,7 +278,8 @@ VisibleSelectionInFlatTree createVisibleSelection(
bool isDirectional) {
DCHECK(!needsLayoutTreeUpdate(base));
DCHECK(!needsLayoutTreeUpdate(extent));
- DCHECK(base.isNotNull() || extent.isNull());
+ // TODO(xiaochengh): We should check |base.isNotNull() || extent.isNull()|
+ // after all call sites have ensured that.
return VisibleSelectionInFlatTree::create(base, extent, affinity,
isDirectional);
}
@@ -304,7 +307,8 @@ VisibleSelectionInFlatTree createVisibleSelection(
bool isDirectional) {
DCHECK(base.isValid());
DCHECK(extent.isValid());
- DCHECK(base.isNotNull() || extent.isNull());
+ // TODO(xiaochengh): We should check |base.isNotNull() || extent.isNull()|
+ // after all call sites have ensured that.
return VisibleSelectionInFlatTree::create(base.deepEquivalent(),
extent.deepEquivalent(),
base.affinity(), isDirectional);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698