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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 201068: NNTP: Disable tabbing to hidden elements.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.js
===================================================================
--- chrome/browser/resources/new_new_tab.js (revision 25626)
+++ chrome/browser/resources/new_new_tab.js (working copy)
@@ -188,7 +188,7 @@
}
mostVisited.updateDisplayMode();
- layoutRecentlyClosed();
+ renderRecentlyClosed();
updateOptionMenu();
}
@@ -298,7 +298,7 @@
if (layoutMode != oldLayoutMode){
mostVisited.invalidate();
mostVisited.layout();
- layoutRecentlyClosed();
+ renderRecentlyClosed();
}
}
@@ -329,7 +329,7 @@
shownSections &= ~Section.THUMB;
mostVisited.invalidate();
} else {
- layoutRecentlyClosed();
+ renderRecentlyClosed();
}
updateOptionMenu();
@@ -347,7 +347,7 @@
}
if (section & Section.RECENT) {
- layoutRecentlyClosed();
+ renderRecentlyClosed();
}
updateOptionMenu();
@@ -677,11 +677,6 @@
} else {
style.opacity = style.height = '';
- // Show all items.
- for (var i = 0, child; child = recentElement.children[i]; i++) {
- child.style.display = '';
- }
-
// We cannot use clientWidth here since the width has a transition.
var spacing = 20;
var headerEl = recentElement.firstElementChild;
@@ -700,7 +695,7 @@
}
elementsToHide.forEach(function(el) {
- el.style.display = 'none';
+ el.parentNode.removeChild(el);
});
}
}
@@ -919,6 +914,8 @@
notificationElement.onmouseout = delayedHide;
actionLink.onfocus = show;
actionLink.onblur = delayedHide;
+ // Enable tabbing to the link now that it is shown.
+ actionLink.tabIndex = 0;
show();
delayedHide();
@@ -927,6 +924,9 @@
function hideNotification() {
var notificationElement = $('notification');
removeClass(notificationElement, 'show');
+ var actionLink = notificationElement.querySelector('.link');
+ // Prevent tabbing to the hidden link.
+ actionLink.tabIndex = -1;
}
function showFirstRunNotification() {
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698