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

Unified Diff: chrome/browser/resources/options/options_page.js

Issue 543493002: Compile chrome://settings, part 2: reduce from 950 to 400 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@F_settings
Patch Set: rebase? rebase! Created 6 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/options/options_page.js
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index b5fedb22dc5223d4b8665b2a54ffc6c784d1857f..ecff73693e374ae249bb1587b4af55e121e730b7 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -4,7 +4,6 @@
cr.define('options', function() {
/** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager;
- /** @const */ var PageManager = cr.ui.pageManager.PageManager;
var OptionsPage = {
/**
@@ -24,24 +23,26 @@ cr.define('options', function() {
/**
* Shows the tab contents for the given navigation tab.
- * @param {!Element} tab The tab that the user clicked.
+ * @param {Node} tab The tab that the user clicked.
*/
showTab: function(tab) {
// Search parents until we find a tab, or the nav bar itself. This allows
// tabs to have child nodes, e.g. labels in separately-styled spans.
- while (tab && !tab.classList.contains('subpages-nav-tabs') &&
+ while (tab && tab.classList &&
+ !tab.classList.contains('subpages-nav-tabs') &&
!tab.classList.contains('tab')) {
tab = tab.parentNode;
}
- if (!tab || !tab.classList.contains('tab'))
+ if (!tab || !tab.classList || !tab.classList.contains('tab'))
return;
// Find tab bar of the tab.
var tabBar = tab;
- while (tabBar && !tabBar.classList.contains('subpages-nav-tabs')) {
+ while (tabBar && tabBar.classList &&
+ !tabBar.classList.contains('subpages-nav-tabs')) {
tabBar = tabBar.parentNode;
}
- if (!tabBar)
+ if (!tabBar || !tabBar.classList)
return;
if (tabBar.activeNavTab != null) {
« no previous file with comments | « chrome/browser/resources/options/manage_profile_overlay.js ('k') | chrome/browser/resources/options/origin_resources_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698