Chromium Code Reviews| 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 { |