[INVALID] canvas only updates after tab/window switch

Ask for help about NoScript, no registration needed to post
Frank_D

[INVALID] canvas only updates after tab/window switch

Post by Frank_D »

Hello,

NoScript prevents the canvas element from showing changes until you switch to another window/tab. The script below
demonstrates it. It has an onclick handler for the canvas element that pushes the clicked location
into an array an then orders to redraw the canvas with all points recorded so far. So basically each click should add a point
to the canvas. If NoScript is enabled, however, the canvas won't be redrawn (but all JS is executed!) until you switch to
another window/tab. After the switch it will continue to work properly.

Code: http://pastie.org/private/xjur0j5goyjrzaovrqxfa
To test it: http://pastehtml.com/view/cdd0eeyxw.html

Greetings,
FrankD
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
User avatar
therube
Ambassador
Posts: 7991
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: canvas only updates after tab/window switch

Post by therube »

Working for me. Dots get added as I click.

Try a new Profile with only NoScript added in.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 SeaMonkey/2.14a2
Frank_D

Re: canvas only updates after tab/window switch

Post by Frank_D »

I tried it with a fresh profile and NoScript enabled there. It worked. And I also figured out why it doesn't work in the other profile. The Firefox config gfx.blacklist.direct2d;3 that can be set in about:config (restart required to make it effective) in combination with the NoScript extension causes the behaviour described int he first post. If "NoScript enabled" and "gfx.blacklist.direct2d;3" it fails. (So disabling one of them or both will make it work.)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Guest

Re: canvas only updates after tab/window switch

Post by Guest »

"gfx.blacklist.direct2d;3"
is set by unchecking
"Options -> Advanced -> General -> Browsing -> Use hardware acceleration when available"
in Firefox.

Image http://www.abload.de/img/settingsi9swm.jpg
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
User avatar
therube
Ambassador
Posts: 7991
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: canvas only updates after tab/window switch

Post by therube »

Appears that gfx.blacklist.direct2d is a not defaulted, but perhaps because of the particular video card/driver you are using, it is for you?

Blocklisting/Blocked Graphics Drivers


The Use hardware acceleration when available setting looks to affect the Preference, gfx.direct2d.disabled, not what you've mentioned.


(There are 1,001 gfx related Preferences & I don't think anyone knows what they all do, much less how one relates to another.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 SeaMonkey/2.14a2
Frank_D

Re: canvas only updates after tab/window switch

Post by Frank_D »

Hello,

I',m sorry. It does not seem to be related to NoScript at all. The "downloaded blacklist" in Firefox seems to disable "Direct2D" and "Layers Acceleration" for all users of the current Catalyst driver (8.982.0.0). As a consequence the strange canvas as described in the first post occurs. Firefox downloads this list at time points unknown to me and it seems to have come together that when I enabled NoScript it also downloaded the list and disabled the hardware acceleration. Sorry for having stolen your time!

Greets
Frank
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Post Reply