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

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

Issue 2249873003: Settings: Fix Site Details subpage routing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 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 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 f5fcf778c74ea574b6d2bab8fc4c5f2074238e32..a2a834095208203adff4d0890b17d076cbf2b14d 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -92,12 +92,12 @@ Polymer({
this.ensureSubpageInstance_();
if (oldRoute) {
- if (oldRoute.isSubpage() && oldRoute.contains(newRoute)) {
- // Slide left for a descendant subpage.
+ if (oldRoute.isSubpage() && newRoute.depth > oldRoute.depth) {
michaelpg 2016/08/17 00:40:49 Wait a minute, isn't this exactly what we had prev
tommycli 2016/08/17 16:17:00 Previously we checked if the subpage.length > 0, b
+ // Slide left for a deeper subpage.
this.$.animatedPages.exitAnimation = 'slide-left-animation';
this.$.animatedPages.entryAnimation = 'slide-from-right-animation';
- } else if (newRoute.contains(oldRoute)) {
- // Slide right for an ancestor subpage.
+ } else if (oldRoute.depth > newRoute.depth) {
+ // Slide right for an shallower subpage.
michaelpg 2016/08/17 00:40:49 s/an/a
tommycli 2016/08/17 16:17:00 Done.
this.$.animatedPages.exitAnimation = 'slide-right-animation';
this.$.animatedPages.entryAnimation = 'slide-from-left-animation';
} else {
« no previous file with comments | « chrome/browser/resources/settings/route.js ('k') | chrome/browser/resources/settings/settings_page/settings_subpage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698