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

Unified Diff: tracing/tracing/ui/scripting_control.html

Issue 1928873003: Use Polymer.dom with many dom manipulations. (Closed) Base URL: https://github.com/catapult-project/catapult.git@polymer10-migration
Patch Set: fixes Created 4 years, 8 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: tracing/tracing/ui/scripting_control.html
diff --git a/tracing/tracing/ui/scripting_control.html b/tracing/tracing/ui/scripting_control.html
index de82d4d230daa394d2cfb75f9eaa5fd4acc4d62b..9f43e82886e0a1cc949182b6b815983c22b78b19 100644
--- a/tracing/tracing/ui/scripting_control.html
+++ b/tracing/tracing/ui/scripting_control.html
@@ -87,19 +87,20 @@ Polymer({
var promptEl = this.$.prompt;
if (focused) {
promptEl.focus();
- this.$.root.classList.add('focused');
+ Polymer.dom(this.$.root).classList.add('focused');
// Move cursor to the end of any existing text.
if (promptEl.innerText.length > 0) {
var sel = window.getSelection();
- sel.collapse(promptEl.firstChild, promptEl.innerText.length);
+ sel.collapse(
+ Polymer.dom(promptEl).firstChild, promptEl.innerText.length);
}
} else {
promptEl.blur();
- this.$.root.classList.remove('focused');
+ Polymer.dom(this.$.root).classList.remove('focused');
// Workaround for crbug.com/89026 to ensure the prompt doesn't retain
// keyboard focus.
var parent = promptEl.parentElement;
- var nextEl = promptEl.nextSibling;
+ var nextEl = Polymer.dom(promptEl).nextSibling;
promptEl.remove();
Polymer.dom(parent).insertBefore(promptEl, nextEl);
}
@@ -160,10 +161,10 @@ Polymer({
toggleVisibility: function() {
var root = this.$.root;
if (!this.visible) {
- root.classList.remove('hidden');
+ Polymer.dom(root).classList.remove('hidden');
this._setFocused(true);
} else {
- root.classList.add('hidden');
+ Polymer.dom(root).classList.add('hidden');
this._setFocused(false);
}
},
@@ -174,7 +175,7 @@ Polymer({
get visible() {
var root = this.$.root;
- return !root.classList.contains('hidden');
+ return !Polymer.dom(root).classList.contains('hidden');
},
get controller() {

Powered by Google App Engine
This is Rietveld 408576698