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

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_animated_pages.js

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review Created 3 years, 6 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
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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-animated-pages' is a container for a page and animated subpages. 7 * 'settings-animated-pages' is a container for a page and animated subpages.
8 * It provides a set of common behaviors and animations. 8 * It provides a set of common behaviors and animations.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // 'pop' (backwards) navigation. 63 // 'pop' (backwards) navigation.
64 if (!settings.lastRouteChangeWasPopstate()) 64 if (!settings.lastRouteChangeWasPopstate())
65 return; 65 return;
66 66
67 // Only handle iron-select events from neon-animatable elements and the 67 // Only handle iron-select events from neon-animatable elements and the
68 // given whitelist of settings-subpage instances. 68 // given whitelist of settings-subpage instances.
69 var whitelist = 'settings-subpage#site-settings, ' + 69 var whitelist = 'settings-subpage#site-settings, ' +
70 'settings-subpage[route-path=\"' + 70 'settings-subpage[route-path=\"' +
71 settings.Route.SITE_SETTINGS_COOKIES.path + '\"]'; 71 settings.Route.SITE_SETTINGS_COOKIES.path + '\"]';
72 72
73 // <if expr="chromeos"> 73 // <if expr="chromeos">
74 whitelist += ', settings-subpage[route-path=\"' + 74 whitelist += ', settings-subpage[route-path=\"' +
75 settings.Route.INTERNET_NETWORKS.path + '\"]'; 75 settings.Route.INTERNET_NETWORKS.path + '\"]';
76 // </if> 76 // </if>
77 77
78 if (!e.detail.item.matches('neon-animatable, ' + whitelist)) 78 if (!e.detail.item.matches('neon-animatable, ' + whitelist))
79 return; 79 return;
80 80
81 var selector = this.focusConfig.get(this.previousRoute_.path); 81 var selector = this.focusConfig.get(this.previousRoute_.path);
82 if (selector) { 82 if (selector) {
83 // neon-animatable has "display: none" until the animation finishes, so 83 // neon-animatable has "display: none" until the animation finishes, so
84 // calling focus() on any of its children has no effect until "display: 84 // calling focus() on any of its children has no effect until "display:
85 // none" is removed. Therefore, don't set focus from within the 85 // none" is removed. Therefore, don't set focus from within the
86 // currentRouteChanged callback. Using 'iron-select' listener which fires 86 // currentRouteChanged callback. Using 'iron-select' listener which fires
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // instance, such that the stamped instance will also be ignored by the 196 // instance, such that the stamped instance will also be ignored by the
197 // searching algorithm. 197 // searching algorithm.
198 if (template.hasAttribute('no-search')) 198 if (template.hasAttribute('no-search'))
199 subpage.setAttribute('no-search', ''); 199 subpage.setAttribute('no-search', '');
200 200
201 // Render synchronously so neon-animated-pages can select the subpage. 201 // Render synchronously so neon-animated-pages can select the subpage.
202 template.if = true; 202 template.if = true;
203 template.render(); 203 template.render();
204 }, 204 },
205 }); 205 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698