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

Side by Side Diff: chrome/browser/resources/history/history.js

Issue 395023002: a11y/options: Fix initial tab focus bug on supervised user history page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 <include src="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="history_focus_manager.js"> 6 <include src="history_focus_manager.js">
7 7
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 /** @const */ var RESULTS_PER_PAGE = 150; 10 /** @const */ var RESULTS_PER_PAGE = 150;
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 entry.visit.setIsLead(false); 1696 entry.visit.setIsLead(false);
1697 else 1697 else
1698 el.tabIndex = -1; 1698 el.tabIndex = -1;
1699 } 1699 }
1700 1700
1701 // If there's no focusable elements, allow the first visit to be focused. 1701 // If there's no focusable elements, allow the first visit to be focused.
1702 if (!this.resultDiv_.querySelector('[tabindex="0"]') && 1702 if (!this.resultDiv_.querySelector('[tabindex="0"]') &&
1703 this.currentVisits_.length > 0) { 1703 this.currentVisits_.length > 0) {
1704 var firstVisit = this.currentVisits_[0]; 1704 var firstVisit = this.currentVisits_[0];
1705 firstVisit.setIsLead(true); 1705 firstVisit.setIsLead(true);
1706 if (firstVisit.checkBox) firstVisit.checkBox.tabIndex = 0; 1706 (firstVisit.checkBox || firstVisit.titleLink).tabIndex = 0;
1707 } 1707 }
1708 }; 1708 };
1709 1709
1710 1710
1711 /////////////////////////////////////////////////////////////////////////////// 1711 ///////////////////////////////////////////////////////////////////////////////
1712 // State object: 1712 // State object:
1713 /** 1713 /**
1714 * An 'AJAX-history' implementation. 1714 * An 'AJAX-history' implementation.
1715 * @param {HistoryModel} model The model we're representing. 1715 * @param {HistoryModel} model The model we're representing.
1716 * @param {HistoryView} view The view we're representing. 1716 * @param {HistoryView} view The view we're representing.
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 historyView.reload(); 2290 historyView.reload();
2291 } 2291 }
2292 2292
2293 // Add handlers to HTML elements. 2293 // Add handlers to HTML elements.
2294 document.addEventListener('DOMContentLoaded', load); 2294 document.addEventListener('DOMContentLoaded', load);
2295 2295
2296 // This event lets us enable and disable menu items before the menu is shown. 2296 // This event lets us enable and disable menu items before the menu is shown.
2297 document.addEventListener('canExecute', function(e) { 2297 document.addEventListener('canExecute', function(e) {
2298 e.canExecute = true; 2298 e.canExecute = true;
2299 }); 2299 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698