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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2828013002: Replace DCHECK with DCHECK_EQ and DCHECK_GT as appropriate in modules/accessibility (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index c4065f5ccc0d6c3746400f963255e72dd503eb27..de954bd1ee7d23200d271b60d01c5a89fde7dda9 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1781,9 +1781,9 @@ AXObject::AXRange AXLayoutObject::Selection() const {
return AXRange();
int anchor_offset = anchor_object->IndexForVisiblePosition(visible_start);
- DCHECK(anchor_offset >= 0);
+ DCHECK_GE(anchor_offset, 0);
int focus_offset = focus_object->IndexForVisiblePosition(visible_end);
- DCHECK(focus_offset >= 0);
+ DCHECK_GE(focus_offset, 0);
return AXRange(anchor_object, anchor_offset, start_affinity, focus_object,
focus_offset, end_affinity);
}
@@ -1818,9 +1818,9 @@ AXObject::AXRange AXLayoutObject::SelectionUnderObject() const {
}
int start = IndexForVisiblePosition(selection.VisibleStart());
- DCHECK(start >= 0);
+ DCHECK_GE(start, 0);
int end = IndexForVisiblePosition(selection.VisibleEnd());
- DCHECK(end >= 0);
+ DCHECK_GE(end, 0);
return AXRange(start, end);
}

Powered by Google App Engine
This is Rietveld 408576698