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

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

Issue 2018753002: [MD settings] refine routing function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes Created 4 years, 7 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 27869cd148599361af67adf5b853bb64e28549be..89b3f35e29af908ccc684bb29590a56ec708c5a4 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -146,8 +146,15 @@ Polymer({
* Buttons in this pageset should use this method to transition to subpages.
*/
setSubpageChain: function(subpage) {
+ var node = event.currentTarget;
dpapad 2016/05/27 00:44:22 Where is |event| coming from?
dschuyler 2016/05/27 01:30:49 I commented that it's a global, but there is still
+ var page;
+ while (node) {
+ if (node.dataset && node.dataset.page)
+ page = node.dataset.page;
+ node = node.host || node.parentNode;
dpapad 2016/05/27 00:44:22 What is the expected type(s) of |node|? I recogniz
dschuyler 2016/05/27 01:30:49 Done.
+ }
this.currentRoute = {
- page: this.currentRoute.page,
+ page: page,
section: subpage.length > 0 ? this.section : '',
subpage: subpage,
};
« no previous file with comments | « chrome/browser/resources/settings/basic_page/basic_page.html ('k') | chrome/browser/resources/settings/settings_page_css.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698