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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_grid.js

Issue 1408533002: Turn on verbose flag for compiling file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address review comments. Created 5 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
Index: ui/file_manager/file_manager/foreground/js/ui/file_grid.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
index cb0b9e2b4244eed3058c46dc6817e58b6a9c820f..135af6f1f947014c407110de3cc71db669e43122 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js
@@ -305,7 +305,7 @@ FileGrid.prototype.getFirstItemInRow = function(row) {
FileGrid.prototype.scrollIndexIntoView = function(index) {
var dataModel = this.dataModel;
if (!dataModel || index < 0 || index >= dataModel.length)
- return false;
+ return;
var itemHeight = index < this.dataModel.getFolderCount() ?
this.getFolderItemHeight_() : this.getFileItemHeight_();
@@ -322,27 +322,24 @@ FileGrid.prototype.scrollIndexIntoView = function(index) {
// Function to adjust the tops of viewport and row.
var scrollToAdjustTop = function() {
self.scrollTop = top;
- return true;
};
// Function to adjust the bottoms of viewport and row.
var scrollToAdjustBottom = function() {
self.scrollTop = top + itemHeight - availableHeight;
- return true;
};
// Check if the entire of given indexed row can be shown in the viewport.
if (itemHeight <= availableHeight) {
if (top < scrollTop)
- return scrollToAdjustTop();
- if (scrollTop + availableHeight < top + itemHeight)
- return scrollToAdjustBottom();
+ scrollToAdjustTop();
+ else if (scrollTop + availableHeight < top + itemHeight)
+ scrollToAdjustBottom();
} else {
if (scrollTop < top)
- return scrollToAdjustTop();
- if (top + itemHeight < scrollTop + availableHeight)
- return scrollToAdjustBottom();
+ scrollToAdjustTop();
+ else if (top + itemHeight < scrollTop + availableHeight)
+ scrollToAdjustBottom();
}
- return false;
};
/**

Powered by Google App Engine
This is Rietveld 408576698