[Global] Update refs to UI.themeSupport

Bug: 1006759
Change-Id: I8d11fd8de1f43e2add97dd09dd539bfda4a23f39
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019560
Commit-Queue: Paul Lewis <[email protected]>
Reviewed-by: Tim van der Lippe <[email protected]>
diff --git a/front_end/ui/SoftContextMenu.js b/front_end/ui/SoftContextMenu.js
index db118f7..5d13fe0 100644
--- a/front_end/ui/SoftContextMenu.js
+++ b/front_end/ui/SoftContextMenu.js
@@ -195,7 +195,7 @@
 
     menuItemElement.createTextChild(item.label);
 
-    if (Host.Platform.isMac() && !UI.themeSupport.hasTheme()) {
+    if (Host.Platform.isMac() && !self.UI.themeSupport.hasTheme()) {
       const subMenuArrowElement = menuItemElement.createChild('span', 'soft-context-menu-item-submenu-arrow');
       subMenuArrowElement.textContent = '\u25B6';  // BLACK RIGHT-POINTING TRIANGLE
     } else {
@@ -313,7 +313,7 @@
     }
     this._highlightedMenuItemElement = menuItemElement;
     if (this._highlightedMenuItemElement) {
-      if (UI.themeSupport.hasTheme() || Host.Platform.isMac()) {
+      if (self.UI.themeSupport.hasTheme() || Host.Platform.isMac()) {
         this._highlightedMenuItemElement.classList.add('force-white-icons');
       }
       this._highlightedMenuItemElement.classList.add('soft-context-menu-item-mouse-over');
diff --git a/front_end/ui/UIUtils.js b/front_end/ui/UIUtils.js
index fe8edcd..f2ff318 100644
--- a/front_end/ui/UIUtils.js
+++ b/front_end/ui/UIUtils.js
@@ -1244,10 +1244,10 @@
     document.defaultView.requestAnimationFrame(() => void(UI._keyboardFocus = false));
   }, true);
 
-  if (!UI.themeSupport) {
-    UI.themeSupport = new ThemeSupport(themeSetting);
+  if (!self.UI.themeSupport) {
+    self.UI.themeSupport = new ThemeSupport(themeSetting);
   }
-  UI.themeSupport.applyTheme(document);
+  self.UI.themeSupport.applyTheme(document);
 
   const body = /** @type {!Element} */ (document.body);
   appendStyle(body, 'ui/inspectorStyle.css');
diff --git a/front_end/ui/ui-legacy.js b/front_end/ui/ui-legacy.js
index 719b543..2ca260e 100644
--- a/front_end/ui/ui-legacy.js
+++ b/front_end/ui/ui-legacy.js
@@ -728,7 +728,7 @@
 UI.AutocompleteConfig;
 
 /** @type {?UI.ThemeSupport} */
-UI.themeSupport;
+self.UI.themeSupport;
 
 /** @typedef {!{title: (string|!Element|undefined), editable: (boolean|undefined) }} */
 UI.Renderer.Options;
diff --git a/front_end/ui/utils/append-style.js b/front_end/ui/utils/append-style.js
index 385bee9..d9d2d29 100644
--- a/front_end/ui/utils/append-style.js
+++ b/front_end/ui/utils/append-style.js
@@ -16,7 +16,7 @@
   styleElement.textContent = content;
   node.appendChild(styleElement);
 
-  const themeStyleSheet = UI.themeSupport.themeStyleSheet(cssFile, content);
+  const themeStyleSheet = self.UI.themeSupport.themeStyleSheet(cssFile, content);
   if (themeStyleSheet) {
     styleElement = createElement('style');
     styleElement.textContent = themeStyleSheet + '\n' + Root.Runtime.resolveSourceURL(cssFile + '.theme');
diff --git a/front_end/ui/utils/inject-core-styles.js b/front_end/ui/utils/inject-core-styles.js
index 36a3b02..581c418 100644
--- a/front_end/ui/utils/inject-core-styles.js
+++ b/front_end/ui/utils/inject-core-styles.js
@@ -10,6 +10,6 @@
 export function injectCoreStyles(root) {
   appendStyle(root, 'ui/inspectorCommon.css');
   appendStyle(root, 'ui/textButton.css');
-  UI.themeSupport.injectHighlightStyleSheets(root);
-  UI.themeSupport.injectCustomStyleSheets(root);
+  self.UI.themeSupport.injectHighlightStyleSheets(root);
+  self.UI.themeSupport.injectCustomStyleSheets(root);
 }