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

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

Issue 2912473004: [MD settings] rename lastRoutChangeWasPopstate var (Closed)
Patch Set: name change 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /** 54 /**
55 * @param {!Event} e 55 * @param {!Event} e
56 * @private 56 * @private
57 */ 57 */
58 onIronSelect_: function(e) { 58 onIronSelect_: function(e) {
59 if (!this.focusConfig || !this.previousRoute_) 59 if (!this.focusConfig || !this.previousRoute_)
60 return; 60 return;
61 61
62 // Don't attempt to focus any anchor element, unless last navigation was a 62 // Don't attempt to focus any anchor element, unless last navigation was a
63 // 'pop' (backwards) navigation. 63 // 'pop' (backwards) navigation.
64 if (!settings.lastRouteChangeWasPopstate()) 64 if (!settings.wasLastRouteChangePopstate())
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=\"' +
(...skipping 121 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