Closed Bug 1429750 Opened 8 years ago Closed 7 years ago

chrome.browserAction.setIcon flicker problem

Categories

(WebExtensions :: Untriaged, defect)

57 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1309347

People

(Reporter: Jdanov-filebit, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20180103231032 Steps to reproduce: I ran into the following problem in chrome.browserAction.setIcon: 1)Сreate a canvas <canvas id="canv" width="27" height="27"></canvas> <img src="1.png"/> <img src="2.png"/> 2)Use it in JS as follows var canv, canvContext; var array_logo = []; $(document).ready(function(){ canv = document.getElementById('canv'); canvContext = canv.getContext('2d'); array_logo = document.getElementsByTagName('img'); }); function doAnimate() { canvContext.save(); canvContext.clearRect(0, 0, canv.width, canv.height); canvContext.rotate(0.5*2*Math.PI); canvContext.drawImage(array_logo[0],-Math.floor(array_logo[0].width/2), -Math.floor(array_logo[0].height/2)); canvContext.restore(); chrome.browserAction.setIcon({imageData: canvContext.getImageData(0, 0, canv.width, canv.height)}); } setInterval(function(){doAnimate();}, 10); Actual results: The extension icon is strongly flickering, or not at all, this behavior is only observed in Firefox, this code is correctly executed in the Chrome browser. Expected results: The extension icon should rotate around the axis without flickering and be visible
A similar issue was logged in bug 1309347. It seems that animated images for toolbar buttons are intentionally not supported (see bug 1309347 comment1). Kris, can you please take a look at this? There are any updates regarding the animated images for toolbar buttons? Also, can we close this issue as dupe of bug 1309347?
Flags: needinfo?(kmaglione+bmo)
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Product: Toolkit → WebExtensions
Flags: needinfo?(kmaglione+bmo) → needinfo?(mconca)
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(mconca)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.