Commit 31b5ab0c authored by sauski's avatar sauski Committed by Commit Bot

Change Settings static element map access to query selector

CL 2088233 wrapped some elements on the privacy page into dom-if's such
that they no longer appear in the static element map accessed with .$.

Code that relied on these elements existing in this map thus failed.
This CL changes these call sites to instead use the query selector $$
call, which will successfully return the elements inside a dom-if.

Bug: 1058960
Change-Id: I2e0380a7e5f4251865f5ae809037401fccbc7446
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090456
Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747434}
parent 09625ebf
...@@ -446,7 +446,7 @@ cr.define('settings', function() { ...@@ -446,7 +446,7 @@ cr.define('settings', function() {
/** @private */ /** @private */
onDoNotTrackDialogClosed_() { onDoNotTrackDialogClosed_() {
cr.ui.focusWithoutInk(this.$.doNotTrack); cr.ui.focusWithoutInk(assert(this.$$('#doNotTrack')));
}, },
/** /**
...@@ -454,7 +454,7 @@ cr.define('settings', function() { ...@@ -454,7 +454,7 @@ cr.define('settings', function() {
* @private * @private
*/ */
onDoNotTrackDialogConfirm_() { onDoNotTrackDialogConfirm_() {
/** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack) /** @type {!SettingsToggleButtonElement} */ (this.$$('#doNotTrack'))
.sendPrefChange(); .sendPrefChange();
this.closeDoNotTrackDialog_(); this.closeDoNotTrackDialog_();
}, },
...@@ -465,7 +465,7 @@ cr.define('settings', function() { ...@@ -465,7 +465,7 @@ cr.define('settings', function() {
* @private * @private
*/ */
onDoNotTrackDialogCancel_() { onDoNotTrackDialogCancel_() {
/** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack) /** @type {!SettingsToggleButtonElement} */ (this.$$('#doNotTrack'))
.resetToPrefValue(); .resetToPrefValue();
this.closeDoNotTrackDialog_(); this.closeDoNotTrackDialog_();
}, },
...@@ -543,7 +543,7 @@ cr.define('settings', function() { ...@@ -543,7 +543,7 @@ cr.define('settings', function() {
onDialogClosed_() { onDialogClosed_() {
settings.Router.getInstance().navigateTo( settings.Router.getInstance().navigateTo(
settings.routes.CLEAR_BROWSER_DATA.parent); settings.routes.CLEAR_BROWSER_DATA.parent);
cr.ui.focusWithoutInk(assert(this.$.clearBrowsingData)); cr.ui.focusWithoutInk(assert(this.$$('#clearBrowsingData')));
}, },
/** @private */ /** @private */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment