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

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

Issue 1653673002: Even more explicit LayoutUnit conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moarConstructors
Patch Set: address comments Created 4 years, 11 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 df0e6c6aa9e35d501e0979a3786bc4ef4929e14c..6cc510d9af8d2c8c20f728dad25b667f4030259b 100644
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
@@ -194,8 +194,8 @@ bool scrollInDirection(LocalFrame* frame, WebFocusType type)
ASSERT(frame);
if (frame && canScrollInDirection(frame->document(), type)) {
- LayoutUnit dx = 0;
- LayoutUnit dy = 0;
+ LayoutUnit dx;
+ LayoutUnit dy;
switch (type) {
case WebFocusTypeLeft:
dx = - ScrollableArea::pixelsPerLineStep();
@@ -230,8 +230,8 @@ bool scrollInDirection(Node* container, WebFocusType type)
return false;
if (canScrollInDirection(container, type)) {
- LayoutUnit dx = 0;
- LayoutUnit dy = 0;
+ LayoutUnit dx;
+ LayoutUnit dy;
switch (type) {
case WebFocusTypeLeft:
dx = - std::min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->layoutBox()->scrollLeft());

Powered by Google App Engine
This is Rietveld 408576698