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

Unified Diff: chrome/browser/resources/settings/settings_page/settings_animated_pages.js

Issue 1372713002: Settings Rewrite: Fix subpage animations for direct URLs to subpages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/settings_page/settings_animated_pages.js
diff --git a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
index 6df51fd3261284764c8d537d88722dd7e824c44d..b1ef6697cfcdc10c21ee12784de2499aa483fab0 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -58,10 +58,10 @@ Polymer({
var newRouteIsSubpage = newRoute && newRoute.section == this.section;
var oldRouteIsSubpage = oldRoute && oldRoute.section == this.section;
- // If two routes are at the same level, or if either the new or old route is
- // not a subpage, fade in and out.
if (!newRouteIsSubpage || !oldRouteIsSubpage ||
newRoute.subpage.length == oldRoute.subpage.length) {
+ // If two routes are at the same level, or if either the new or old route
+ // is not a subpage, fade in and out.
this.$.animatedPages.exitAnimation = 'fade-out-animation';
this.$.animatedPages.entryAnimation = 'fade-in-animation';
} else {
@@ -75,14 +75,8 @@ Polymer({
}
}
- if (newRouteIsSubpage) {
- // TODO(tommycli): Support paths where the final component carries
- // data rather than referring to a specific subpage.
- // E.g. internet > internet/known-networks > internet/detail/wifi1_guid
- this.$.animatedPages.selected = newRoute.subpage.slice(-1)[0];
- } else {
- this.$.animatedPages.selected = '';
- }
+ this.$.animatedPages.selected =
+ newRouteIsSubpage ? newRoute.subpage.slice(-1)[0] : '';
},
/**

Powered by Google App Engine
This is Rietveld 408576698