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

Unified Diff: third_party/WebKit/Source/core/page/SpatialNavigation.cpp

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: Created 3 years, 7 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/core/page/SpatialNavigation.cpp
diff --git a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
index bba96114c553f431aa252da6d0a71eba828d7454..5b43a748710d022f5e4e1319b857eeb18922b6cf 100644
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
@@ -249,7 +249,7 @@ bool ScrollInDirection(Node* container, WebFocusType type) {
dx = -pixels_per_line_step;
break;
case kWebFocusTypeRight:
- ASSERT(container->GetLayoutBox()->ScrollWidth() >
+ DCHECK(container->GetLayoutBox()->ScrollWidth() >
(container->GetLayoutBox()->ScrollLeft() +
container->GetLayoutBox()->ClientWidth()));
dx = pixels_per_line_step;
@@ -258,7 +258,7 @@ bool ScrollInDirection(Node* container, WebFocusType type) {
dy = -pixels_per_line_step;
break;
case kWebFocusTypeDown:
- ASSERT(container->GetLayoutBox()->ScrollHeight() -
+ DCHECK(container->GetLayoutBox()->ScrollHeight() -
(container->GetLayoutBox()->ScrollTop() +
container->GetLayoutBox()->ClientHeight()));
dy = pixels_per_line_step;
@@ -408,7 +408,7 @@ static LayoutRect RectToAbsoluteCoordinates(LocalFrame* initial_frame,
}
LayoutRect NodeRectInAbsoluteCoordinates(Node* node, bool ignore_border) {
- ASSERT(node && node->GetLayoutObject() &&
+ DCHECK(node && node->GetLayoutObject() &&
!node->GetDocument().View()->NeedsLayout());
if (node->IsDocumentNode())
@@ -624,7 +624,7 @@ void DistanceDataForNode(WebFocusType type,
}
bool CanBeScrolledIntoView(WebFocusType type, const FocusCandidate& candidate) {
- ASSERT(candidate.visible_node && candidate.is_offscreen);
+ DCHECK(candidate.visible_node && candidate.is_offscreen);
LayoutRect candidate_rect = candidate.rect;
for (Node& parent_node :
NodeTraversal::AncestorsOf(*candidate.visible_node)) {

Powered by Google App Engine
This is Rietveld 408576698