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..be390e5b1d0ed30c3bbe082dcf11ea72f5b6aee5 100644 |
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp |
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp |
@@ -249,16 +249,16 @@ bool ScrollInDirection(Node* container, WebFocusType type) { |
dx = -pixels_per_line_step; |
break; |
case kWebFocusTypeRight: |
- ASSERT(container->GetLayoutBox()->ScrollWidth() > |
- (container->GetLayoutBox()->ScrollLeft() + |
- container->GetLayoutBox()->ClientWidth())); |
+ DCHECK_GT(container->GetLayoutBox()->ScrollWidth(), |
+ (container->GetLayoutBox()->ScrollLeft() + |
+ container->GetLayoutBox()->ClientWidth())); |
dx = pixels_per_line_step; |
break; |
case kWebFocusTypeUp: |
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,8 +408,8 @@ static LayoutRect RectToAbsoluteCoordinates(LocalFrame* initial_frame, |
} |
LayoutRect NodeRectInAbsoluteCoordinates(Node* node, bool ignore_border) { |
- ASSERT(node && node->GetLayoutObject() && |
- !node->GetDocument().View()->NeedsLayout()); |
+ DCHECK(node && node->GetLayoutObject()); |
haraken
2017/05/20 10:10:22
Split it into two dchecks.
gyuyoung
2017/05/21 00:35:04
Done.
|
+ DCHECK(!node->GetDocument().View()->NeedsLayout()); |
if (node->IsDocumentNode()) |
return FrameRectInAbsoluteCoordinates(ToDocument(node)->GetFrame()); |
@@ -624,7 +624,8 @@ void DistanceDataForNode(WebFocusType type, |
} |
bool CanBeScrolledIntoView(WebFocusType type, const FocusCandidate& candidate) { |
- ASSERT(candidate.visible_node && candidate.is_offscreen); |
+ DCHECK(candidate.visible_node); |
+ DCHECK(candidate.is_offscreen); |
LayoutRect candidate_rect = candidate.rect; |
for (Node& parent_node : |
NodeTraversal::AncestorsOf(*candidate.visible_node)) { |