summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--chrome/browser/resources/new_new_tab.js8
2 files changed, 6 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 576a7ab..1054b52 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -45,3 +45,4 @@ Yuri Gorobets <yuri.gorobets@gmail.com>
Paul Wicks <pwicks86@gmail.com>
Thiago Farina <thiago.farina@gmail.com>
Viet-Trung Luu <viettrungluu@gmail.com>
+Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index 1707cd5..111f8e8 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -456,11 +456,13 @@ var mostVisited = {
}
if (!newItem) {
- newItem = {filler: true};
- }
+ // If no other page is available to replace the blacklisted item,
+ // we need to reorder items s.t. all filler items are in the rightmost
+ // indices.
+ mostVisitedPages(data);
// Replace old item with new item in the mostVisitedData array.
- if (oldIndex != -1) {
+ } else if (oldIndex != -1) {
mostVisitedData.splice(oldIndex, 1, newItem);
mostVisitedPages(mostVisitedData);
addClass(el, 'fade-in');