Skip to content

Commit 3ec2c63

Browse files
committed
Add ability to deactivate workaround for the bug 1763420
1 parent 982d30f commit 3ec2c63

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

webextensions/background/background.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ async function notifyReadyToSidebars() {
191191
async function updatePanelUrl(theme) {
192192
const url = new URL(Constants.kSHORTHAND_URIS.tabbar);
193193
url.searchParams.set('style', configs.style);
194+
url.searchParams.set('reloadMaskImage', !!configs.enableWorkaroundForBug1763420_reloadMaskImage);
194195
if (!theme)
195196
theme = await browser.theme.getCurrent();
196197
browser.sidebarAction.setPanel({ panel: url.href });

webextensions/common/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ export const configs = new Configs({
313313
enableWorkaroundForBug1409262: false,
314314
enableWorkaroundForBug1548949: true,
315315
enableWorkaroundForBug1767165_fixDragEndCoordinates: null, // workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1767165
316+
enableWorkaroundForBug1763420_reloadMaskImage: true, // workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1763420
316317
maximumDelayForBug1561879: 500,
317318
workaroundForBug1548949DroppedTabs: null,
318319
heartbeatInterval: 1000,

webextensions/sidebar/sidebar.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const onReady = new EventListenerManager();
7575

7676
let mTargetWindow = null;
7777
let mInitialized = false;
78+
let mReloadMaskImage = false; // workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1763420
7879

7980
let mPromisedTargetWindowResolver;
8081
const mPromisedTargetWindow = new Promise((resolve, _reject) => {
@@ -98,6 +99,8 @@ document.documentElement.classList.toggle('platform-mac', isMacOS());
9899
if (isNaN(mTargetWindow) || mTargetWindow < 1)
99100
mTargetWindow = null;
100101

102+
mReloadMaskImage = url.searchParams.get('reloadMaskImage') == 'true';
103+
101104
// apply style ASAP!
102105
const style = url.searchParams.get('style');
103106
applyTheme({ style });
@@ -336,7 +339,8 @@ async function applyTheme({ style } = {}) {
336339
]);
337340
applyBrowserTheme(theme);
338341
applyUserStyleRules();
339-
reloadAllMaskImages();
342+
if (mReloadMaskImage)
343+
reloadAllMaskImages();
340344
Size.update();
341345
}
342346

@@ -921,6 +925,10 @@ async function onConfigChange(changedKey) {
921925
rootClasses.toggle('simulate-svg-context-fill', configs[changedKey]);
922926
break;
923927

928+
case 'enableWorkaroundForBug1763420_reloadMaskImage':
929+
mReloadMaskImage = configs[changedKey];
930+
break;
931+
924932
default:
925933
if (changedKey.startsWith('chunkedUserStyleRules'))
926934
applyUserStyleRules();

0 commit comments

Comments
 (0)