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

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

Issue 10388034: Disables the ability to tab to navigation items when an overlay is displayed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Simplifies navigation tabbing Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 cr.define('uber', function() { 5 cr.define('uber', function() {
6 var localStrings = new LocalStrings(); 6 var localStrings = new LocalStrings();
7 7
8 /** 8 /**
9 * Options for how web history should be handled. 9 * Options for how web history should be handled.
10 */ 10 */
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 forwardMouseWheel(e.data.params); 144 forwardMouseWheel(e.data.params);
145 else 145 else
146 console.error('Received unexpected message', e.data); 146 console.error('Received unexpected message', e.data);
147 } 147 }
148 148
149 /** 149 /**
150 * Sends the navigation iframe to the background. 150 * Sends the navigation iframe to the background.
151 */ 151 */
152 function backgroundNavigation() { 152 function backgroundNavigation() {
153 navFrame.classList.add('background'); 153 navFrame.classList.add('background');
154 navFrame.firstChild.tabIndex = -1;
155 navFrame.firstChild.setAttribute('aria-hidden', true);
154 } 156 }
155 157
156 /** 158 /**
157 * Retrieves the navigation iframe from the background. 159 * Retrieves the navigation iframe from the background.
158 */ 160 */
159 function foregroundNavigation() { 161 function foregroundNavigation() {
160 navFrame.classList.remove('background'); 162 navFrame.classList.remove('background');
163 navFrame.firstChild.tabIndex = 0;
164 navFrame.firstChild.removeAttribute('aria-hidden');
161 } 165 }
162 166
163 /** 167 /**
164 * Enables or disables animated transitions when changing content while 168 * Enables or disables animated transitions when changing content while
165 * horizontally scrolled. 169 * horizontally scrolled.
166 * @param {boolean} enabled True if enabled, else false to disable. 170 * @param {boolean} enabled True if enabled, else false to disable.
167 */ 171 */
168 function setContentChanging(enabled) { 172 function setContentChanging(enabled) {
169 navFrame.classList[enabled ? 'add' : 'remove']('changing-content'); 173 navFrame.classList[enabled ? 'add' : 'remove']('changing-content');
170 174
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 335 }
332 336
333 return { 337 return {
334 onLoad: onLoad, 338 onLoad: onLoad,
335 onPopHistoryState: onPopHistoryState 339 onPopHistoryState: onPopHistoryState
336 }; 340 };
337 }); 341 });
338 342
339 window.addEventListener('popstate', uber.onPopHistoryState); 343 window.addEventListener('popstate', uber.onPopHistoryState);
340 document.addEventListener('DOMContentLoaded', uber.onLoad); 344 document.addEventListener('DOMContentLoaded', uber.onLoad);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698