1.9.9.16 breaks the activation of (nearly) invisible objects

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

1.9.9.16 breaks the activation of (nearly) invisible objects

Post by al_9x »

example (forbid flash on trusted)

Prior to .16 activating the placeholder for the invisible (1px) flash player would start the playback, now it causes a reload of the page but the player remains inactive (placeholder remains). You have to allow all flash in the blocked objects menu.

.16 has a fix for this bug that forces a page reload for objects less than 2 pixels:

Better object unblocking behavior, triggering a page reload if allowed object has no layout (i.e. was meant to be scripted only)

Code: Select all

            if (jsEnabled && (obj.offsetWidth < 2 || obj.offsetHeight < 2)) {
              this.quickReload(doc.defaultView);
              return;
            }
The situation in the bug is the exception not the rule. There, the object is set to 0 height because the NS dummy DOM node mistakenly returns 0 for the clientWidth. This post instantiation setting of the height based on width is a rather unique situation requiring a reload to avoid the clientWidth invocation on the NS dummy DOM node. There is, however, nothing inherent in small or invisible objects that requires a reload. So the fix is overkill, all invisible objects should not trigger a reload for the sake of this bug. Hopefully it's possible to narrow the criteria.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by Giorgio Maone »

It's working fine for me on Gecko >= 1.9, broken on Gecko < 1.9. Investigating.
Notice that the rationale behind cached reload on nearly-invisible object is that in 99% of the cases an object not requiring direct user interaction is JavaScript driven, therefore it's likely to remain broken if it's not active during page load.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by al_9x »

Giorgio Maone wrote:It's working fine for me on Gecko >= 1.9, broken on Gecko < 1.9. Investigating.
I confirmed the bug on a new profile with Fx 3.5.5 and NS .18

starting with defaults

1) go to http://www.amazon.com/gp/recsradio/radio/B000006TRV
2) allow amazon.com, images-amazon.com
3) apply to trusted, reload
4) you get the placeholder for the flash player
5) activating it reloads the page, but the placeholder is still there
Giorgio Maone wrote: Notice that the rationale behind cached reload on nearly-invisible object is that in 99% of the cases an object not requiring direct user interaction is JavaScript driven, therefore it's likely to remain broken if it's not active during page load.
This is probably true about utility objects with no UI whatsoever, but these are not the ones you typically want to activate. The ones you do, in my experience, are playback/display helpers with an html ui (just like the amazon example). Are they necessarily more likely to be scripted immediately post instantiation than those with a flash ui? In the bug, for which you added this fix, the object is not invisible, but is nevertheless scripted post instantiation, causing a problem.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by Giorgio Maone »

Hrm, that's weird.
Looks like in a clean profile the reload actually hits the network rather than happening from cache, therefore the embed parameters are slightly different (there's a timestamp) and the whitelist doesn't match.
Investigating, thanks...
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by Giorgio Maone »

Giorgio Maone wrote:Hrm, that's weird.
Looks like in a clean profile the reload actually hits the network rather than happening from cache, therefore the embed parameters are slightly different (there's a timestamp) and the whitelist doesn't match.
Investigating, thanks...
Errata corrige: the timestamp doesn't come down from the network, which is actually left alone. The timestamp is appended by the script creating the object... Quite intricate...
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by Giorgio Maone »

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: 1.9.9.16 breaks the activation of (nearly) invisible objects

Post by al_9x »

Giorgio Maone wrote:Please check latest development build.
Fixed.
Can you provide some means, if only for testing/diagnostic/workaround purposes, for activating a placeholder without forcing a reload? Perhaps through a context menu or holding a key.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
Post Reply