Closed
Bug 1429750
Opened 8 years ago
Closed 7 years ago
chrome.browserAction.setIcon flicker problem
Categories
(WebExtensions :: Untriaged, defect)
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
Comment 1•8 years ago
|
||
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)
Updated•8 years ago
|
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Updated•7 years ago
|
Product: Toolkit → WebExtensions
Updated•7 years ago
|
Flags: needinfo?(kmaglione+bmo) → needinfo?(mconca)
Updated•7 years ago
|
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.
Description
•