OLD | NEW |
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 Loading... |
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 Loading... |
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); |
OLD | NEW |