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

Side by Side Diff: chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js

Issue 2665113007: Fix layout of the sync and sign-in error dialogs when the page zoom is increased. (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/resources/signin/signin_shared_css.html ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 /* Copyright 2015 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('sync.confirmation', function() { 5 cr.define('sync.confirmation', function() {
6 'use strict'; 6 'use strict';
7 7
8 function onConfirm(e) { 8 function onConfirm(e) {
9 chrome.send('confirm'); 9 chrome.send('confirm');
10 } 10 }
(...skipping 10 matching lines...) Expand all
21 document.addEventListener('keydown', onKeyDown); 21 document.addEventListener('keydown', onKeyDown);
22 $('confirmButton').addEventListener('click', onConfirm); 22 $('confirmButton').addEventListener('click', onConfirm);
23 $('undoButton').addEventListener('click', onUndo); 23 $('undoButton').addEventListener('click', onUndo);
24 if (loadTimeData.getBoolean('isSyncAllowed')) { 24 if (loadTimeData.getBoolean('isSyncAllowed')) {
25 $('settingsLink').addEventListener('click', onGoToSettings); 25 $('settingsLink').addEventListener('click', onGoToSettings);
26 $('profile-picture').addEventListener('load', onPictureLoaded); 26 $('profile-picture').addEventListener('load', onPictureLoaded);
27 $('syncDisabledDetails').hidden = true; 27 $('syncDisabledDetails').hidden = true;
28 } else { 28 } else {
29 $('syncConfirmationDetails').hidden = true; 29 $('syncConfirmationDetails').hidden = true;
30 } 30 }
31 chrome.send('initializedWithSize', [document.body.scrollHeight]); 31
32 // Prefer using |document.body.offsetHeight| instead of
33 // |document.body.scrollHeight| as it returns the correct height of the
34 // even when the page zoom in Chrome is different than 100%.
35 chrome.send('initializedWithSize', [document.body.offsetHeight]);
32 } 36 }
33 37
34 function clearFocus() { 38 function clearFocus() {
35 document.activeElement.blur(); 39 document.activeElement.blur();
36 } 40 }
37 41
38 function setUserImageURL(url) { 42 function setUserImageURL(url) {
39 if (loadTimeData.getBoolean('isSyncAllowed')) { 43 if (loadTimeData.getBoolean('isSyncAllowed')) {
40 $('profile-picture').src = url; 44 $('profile-picture').src = url;
41 } 45 }
(...skipping 17 matching lines...) Expand all
59 } 63 }
60 64
61 return { 65 return {
62 clearFocus: clearFocus, 66 clearFocus: clearFocus,
63 initialize: initialize, 67 initialize: initialize,
64 setUserImageURL: setUserImageURL 68 setUserImageURL: setUserImageURL
65 }; 69 };
66 }); 70 });
67 71
68 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize); 72 document.addEventListener('DOMContentLoaded', sync.confirmation.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/signin/signin_shared_css.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698