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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 399613002: Anti-shelf-overlapping fixes for several menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Css fixes intersecting with another CL removed. Created 6 years, 4 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
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 /** 5 /**
6 * @fileoverview Out of the box experience flow (OOBE). 6 * @fileoverview Out of the box experience flow (OOBE).
7 * This is the main code for the OOBE WebUI implementation. 7 * This is the main code for the OOBE WebUI implementation.
8 */ 8 */
9 9
10 <include src="login_common.js"> 10 <include src="login_common.js">
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 /** 140 /**
141 * Accessibility link handler. 141 * Accessibility link handler.
142 */ 142 */
143 handleAccessibilityLinkClick: function(e) { 143 handleAccessibilityLinkClick: function(e) {
144 /** @const */ var BUBBLE_OFFSET = 5; 144 /** @const */ var BUBBLE_OFFSET = 5;
145 /** @const */ var BUBBLE_PADDING = 10; 145 /** @const */ var BUBBLE_PADDING = 10;
146 $('accessibility-menu').showForElement(e.target, 146 $('accessibility-menu').showForElement(e.target,
147 cr.ui.Bubble.Attachment.BOTTOM, 147 cr.ui.Bubble.Attachment.BOTTOM,
148 BUBBLE_OFFSET, BUBBLE_PADDING); 148 BUBBLE_OFFSET, BUBBLE_PADDING);
149
150 var maxHeight = cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping(
151 $('accessibility-menu'));
152 if (maxHeight < $('accessibility-menu').offsetHeight) {
153 $('accessibility-menu').showForElement(e.target,
154 cr.ui.Bubble.Attachment.TOP,
155 BUBBLE_OFFSET, BUBBLE_PADDING);
156 }
157
149 $('accessibility-menu').firstBubbleElement = $('spoken-feedback'); 158 $('accessibility-menu').firstBubbleElement = $('spoken-feedback');
150 $('accessibility-menu').lastBubbleElement = $('close-accessibility-menu'); 159 $('accessibility-menu').lastBubbleElement = $('close-accessibility-menu');
151 if (Oobe.getInstance().currentScreen && 160 if (Oobe.getInstance().currentScreen &&
152 Oobe.getInstance().currentScreen.defaultControl) { 161 Oobe.getInstance().currentScreen.defaultControl) {
153 $('accessibility-menu').elementToFocusOnHide = 162 $('accessibility-menu').elementToFocusOnHide =
154 Oobe.getInstance().currentScreen.defaultControl; 163 Oobe.getInstance().currentScreen.defaultControl;
155 } else { 164 } else {
156 // Update screen falls into this category. Since it doesn't have any 165 // Update screen falls into this category. Since it doesn't have any
157 // controls other than a11y link we don't want that link to receive 166 // controls other than a11y link we don't want that link to receive
158 // focus when screen is shown i.e. defaultControl is not defined. 167 // focus when screen is shown i.e. defaultControl is not defined.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 /** 282 /**
274 * Updates localized content of the screens. 283 * Updates localized content of the screens.
275 * Should be executed on language change. 284 * Should be executed on language change.
276 */ 285 */
277 updateLocalizedContent: function() { 286 updateLocalizedContent: function() {
278 // Buttons, headers and links. 287 // Buttons, headers and links.
279 Oobe.getInstance().updateLocalizedContent_(); 288 Oobe.getInstance().updateLocalizedContent_();
280 } 289 }
281 }; 290 };
282 }); 291 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/network_dropdown.js ('k') | chrome/browser/resources/user_manager/user_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698