[DarkMode] remove enableLegacyPatching option
The option was only allowed to be set to `false`, so it's not been
used at all, so now we can remove it, given that we've had the dark
mode legacy patching disabled without any major bugs in the past few
weeks.
Bug: chromium:1152736
Change-Id: I1e794d75f9c354a0d16b1b3975f7ebdf82b3448b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988303
Commit-Queue: Jack Franklin <[email protected]>
Reviewed-by: Paul Lewis <[email protected]>
diff --git a/front_end/panels/application/AppManifestView.ts b/front_end/panels/application/AppManifestView.ts
index 7555da6..d52df4e 100644
--- a/front_end/panels/application/AppManifestView.ts
+++ b/front_end/panels/application/AppManifestView.ts
@@ -351,7 +351,7 @@
_serviceWorkerManager?: SDK.ServiceWorkerManager.ServiceWorkerManager|null;
constructor() {
super(true);
- this.registerRequiredCSS('panels/application/appManifestView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/appManifestView.css');
this.contentElement.classList.add('manifest-container');
Common.Settings.Settings.instance()
@@ -366,7 +366,7 @@
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this._reportView = new UI.ReportView.ReportView(i18nString(UIStrings.appManifest));
- this._reportView.registerRequiredCSS('panels/application/appManifestView.css', {enableLegacyPatching: false});
+ this._reportView.registerRequiredCSS('panels/application/appManifestView.css');
this._reportView.element.classList.add('manifest-view-header');
this._reportView.show(this.contentElement);
this._reportView.hideWidget();
diff --git a/front_end/panels/application/ApplicationPanelSidebar.ts b/front_end/panels/application/ApplicationPanelSidebar.ts
index b9ab486..c415dc4 100644
--- a/front_end/panels/application/ApplicationPanelSidebar.ts
+++ b/front_end/panels/application/ApplicationPanelSidebar.ts
@@ -226,7 +226,7 @@
this._sidebarTree = new UI.TreeOutline.TreeOutlineInShadow();
this._sidebarTree.element.classList.add('resources-sidebar');
- this._sidebarTree.registerRequiredCSS('panels/application/resourcesSidebar.css', {enableLegacyPatching: false});
+ this._sidebarTree.registerRequiredCSS('panels/application/resourcesSidebar.css');
this._sidebarTree.element.classList.add('filter-all');
// Listener needs to have been set up before the elements are added
this._sidebarTree.addEventListener(UI.TreeOutline.Events.ElementAttached, this._treeElementAdded, this);
diff --git a/front_end/panels/application/BackgroundServiceView.ts b/front_end/panels/application/BackgroundServiceView.ts
index 45ccd0a..e36ec4d 100644
--- a/front_end/panels/application/BackgroundServiceView.ts
+++ b/front_end/panels/application/BackgroundServiceView.ts
@@ -157,8 +157,8 @@
constructor(serviceName: Protocol.BackgroundService.ServiceName, model: BackgroundServiceModel) {
super(true);
- this.registerRequiredCSS('panels/application/backgroundServiceView.css', {enableLegacyPatching: false});
- this.registerRequiredCSS('ui/legacy/emptyWidget.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/backgroundServiceView.css');
+ this.registerRequiredCSS('ui/legacy/emptyWidget.css');
this._serviceName = serviceName;
diff --git a/front_end/panels/application/CookieItemsView.ts b/front_end/panels/application/CookieItemsView.ts
index 51b48bb..fa776a9 100644
--- a/front_end/panels/application/CookieItemsView.ts
+++ b/front_end/panels/application/CookieItemsView.ts
@@ -173,7 +173,7 @@
constructor(model: SDK.CookieModel.CookieModel, cookieDomain: string) {
super(i18nString(UIStrings.cookies), 'cookiesPanel');
- this.registerRequiredCSS('panels/application/cookieItemsView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/cookieItemsView.css');
this.element.classList.add('storage-view');
this._model = model;
diff --git a/front_end/panels/application/IndexedDBViews.ts b/front_end/panels/application/IndexedDBViews.ts
index 6768ecd..9e9e285 100644
--- a/front_end/panels/application/IndexedDBViews.ts
+++ b/front_end/panels/application/IndexedDBViews.ts
@@ -161,13 +161,13 @@
this._model = model;
const databaseName = database ? database.databaseId.name : i18nString(UIStrings.loading);
- this.registerRequiredCSS('panels/application/indexedDBViews.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/indexedDBViews.css');
this.contentElement.classList.add('indexed-db-container');
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this._reportView = new UI.ReportView.ReportView(databaseName);
this._reportView.show(this.contentElement);
- this._reportView.registerRequiredCSS('panels/application/indexedDBViews.css', {enableLegacyPatching: false});
+ this._reportView.registerRequiredCSS('panels/application/indexedDBViews.css');
this._reportView.element.classList.add('indexed-db-header');
const bodySection = this._reportView.appendSection('');
@@ -253,7 +253,7 @@
model: IndexedDBModel, databaseId: DatabaseId, objectStore: ObjectStore, index: Index|null,
refreshObjectStoreCallback: () => void) {
super(i18nString(UIStrings.idb));
- this.registerRequiredCSS('panels/application/indexedDBViews.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/indexedDBViews.css');
this._model = model;
this._databaseId = databaseId;
diff --git a/front_end/panels/application/OpenedWindowDetailsView.ts b/front_end/panels/application/OpenedWindowDetailsView.ts
index 6133bfe..d6703cd 100644
--- a/front_end/panels/application/OpenedWindowDetailsView.ts
+++ b/front_end/panels/application/OpenedWindowDetailsView.ts
@@ -158,12 +158,11 @@
super();
this._targetInfo = targetInfo;
this._isWindowClosed = isWindowClosed;
- this.registerRequiredCSS('panels/application/frameDetailsReportView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/frameDetailsReportView.css');
this.contentElement.classList.add('frame-details-container');
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this._reportView = new UI.ReportView.ReportView(this.buildTitle());
- this._reportView.registerRequiredCSS(
- 'panels/application/frameDetailsReportView.css', {enableLegacyPatching: false});
+ this._reportView.registerRequiredCSS('panels/application/frameDetailsReportView.css');
this._reportView.show(this.contentElement);
this._reportView.element.classList.add('frame-details-report-container');
@@ -226,13 +225,12 @@
constructor(targetInfo: Protocol.Target.TargetInfo) {
super();
this._targetInfo = targetInfo;
- this.registerRequiredCSS('panels/application/frameDetailsReportView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/frameDetailsReportView.css');
this.contentElement.classList.add('frame-details-container');
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this._reportView =
new UI.ReportView.ReportView(this._targetInfo.title || this._targetInfo.url || i18nString(UIStrings.worker));
- this._reportView.registerRequiredCSS(
- 'panels/application/frameDetailsReportView.css', {enableLegacyPatching: false});
+ this._reportView.registerRequiredCSS('panels/application/frameDetailsReportView.css');
this._reportView.show(this.contentElement);
this._reportView.element.classList.add('frame-details-report-container');
diff --git a/front_end/panels/application/ResourcesPanel.ts b/front_end/panels/application/ResourcesPanel.ts
index 05f48b4..699ca6e 100644
--- a/front_end/panels/application/ResourcesPanel.ts
+++ b/front_end/panels/application/ResourcesPanel.ts
@@ -34,7 +34,7 @@
private constructor() {
super('resources');
- this.registerRequiredCSS('panels/application/resourcesPanel.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/resourcesPanel.css');
this._resourcesLastSelectedItemSetting =
Common.Settings.Settings.instance().createSetting('resourcesLastSelectedElementPath', []);
diff --git a/front_end/panels/application/ServiceWorkerCacheViews.ts b/front_end/panels/application/ServiceWorkerCacheViews.ts
index 366c822..fde760a 100644
--- a/front_end/panels/application/ServiceWorkerCacheViews.ts
+++ b/front_end/panels/application/ServiceWorkerCacheViews.ts
@@ -91,7 +91,7 @@
}>|null;
constructor(model: SDK.ServiceWorkerCacheModel.ServiceWorkerCacheModel, cache: SDK.ServiceWorkerCacheModel.Cache) {
super(i18nString(UIStrings.cache));
- this.registerRequiredCSS('panels/application/serviceWorkerCacheViews.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/serviceWorkerCacheViews.css');
this._model = model;
this._entriesForTest = null;
diff --git a/front_end/panels/application/ServiceWorkersView.ts b/front_end/panels/application/ServiceWorkersView.ts
index bbf91cd..42a853c 100644
--- a/front_end/panels/application/ServiceWorkersView.ts
+++ b/front_end/panels/application/ServiceWorkersView.ts
@@ -187,7 +187,7 @@
constructor() {
super(true);
- this.registerRequiredCSS('panels/application/serviceWorkersView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/serviceWorkersView.css');
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this._currentWorkersView = new UI.ReportView.ReportView(i18n.i18n.lockedString('Service Workers'));
@@ -814,9 +814,9 @@
}
_wrapWidget(container: Element): Element {
- const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(
- container, {cssFile: undefined, enableLegacyPatching: false, delegatesFocus: undefined});
- UI.Utils.appendStyle(shadowRoot, 'panels/application/serviceWorkersView.css', {enableLegacyPatching: false});
+ const shadowRoot =
+ UI.Utils.createShadowRootWithCoreStyles(container, {cssFile: undefined, delegatesFocus: undefined});
+ UI.Utils.appendStyle(shadowRoot, 'panels/application/serviceWorkersView.css');
const contentElement = document.createElement('div');
shadowRoot.appendChild(contentElement);
return contentElement;
diff --git a/front_end/panels/application/StorageView.ts b/front_end/panels/application/StorageView.ts
index 438f94a..c83a6fd 100644
--- a/front_end/panels/application/StorageView.ts
+++ b/front_end/panels/application/StorageView.ts
@@ -160,7 +160,7 @@
constructor() {
super(true, 1000);
- this.registerRequiredCSS('panels/application/storageView.css', {enableLegacyPatching: false});
+ this.registerRequiredCSS('panels/application/storageView.css');
this.contentElement.classList.add('clear-storage-container');
this.pieColors = new Map([
[Protocol.Storage.StorageType.Appcache, 'rgb(110, 161, 226)'], // blue
@@ -174,7 +174,7 @@
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
this.reportView = new UI.ReportView.ReportView(i18nString(UIStrings.storageTitle));
- this.reportView.registerRequiredCSS('panels/application/storageView.css', {enableLegacyPatching: false});
+ this.reportView.registerRequiredCSS('panels/application/storageView.css');
this.reportView.element.classList.add('clear-storage-header');
this.reportView.show(this.contentElement);
/** @type {?SDK.Target.Target} */