bugGnash - The GNU Flash player - Bugs: bug #38625, Gnash initially set Stage.width...

 
 

bug #38625: Gnash initially set Stage.width and Stage.height to SWF metadata regardless what <embed> tag says

Submitted by:  Nachanon Vetjasit <nachanon>
Submitted on:  Fri 29 Mar 2013 12:19:34 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Release: 0.8.10Status: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 02 Apr 2013 04:53:35 PM UTC, comment #3:

I've created a dummy flash page to demonstrate this problem,
by using 16x16 pixel SWF dimension, set stage to 'noScale' mode in the movie's constructor,
and immediately grab Stage.width, Stage.height
then set the obtained dimension to TextField,
similar to what SounManager2 do at runtime.

My dummy flash page with source code (compiles in MTASC)
and screenshots also attached; file #27747

This is a correct trace output from Adobe Flash Player 11:
You'd see that Flash Player switched to <embed>'s dimension immediately in Stage.scaleMode="noScale" statement, with resize event instantly fired.
In the screenshot, you'll see that Flash correctly displayed "Hello World".

This is a trace output from Gnash 0.8.10:
You'd see that Gnash didn't change to <embed>'s dimension immediately in Stage.scaleMode="noScale" statement.
It instead, delayed until constructor finished execution, then applies the new dimension (with resize event fired afterward).
In the screenshot, you'll see that Gnash displayed only the "He" part.

Gnash: gnash 0.8.10-1~lenny, browser-plugin-gnash 0.8.10-1~lenny from getgnash.org APT repository
Browser: iceweasel 3.0.6-3 from Debian repository (no addons)
System: Debian GNU/Linux 5.0 Lenny on i386

Nachanon Vetjasit <nachanon>
Tue 02 Apr 2013 04:02:54 PM UTC, comment #2:

Oh sorry, I described it all the wrong way.

The summary should be this instead:
Gnash didn't change stage dimension immediately when Stage.scaleMode was changed to 'noScale'

since this applies only when movie sets the stage to 100% Mode.
It's not that gnash retains SWF dimension in Stage.width or Stage.height.

The problem is gnash delayed firing of stage resize event.

Nachanon Vetjasit <nachanon>
Fri 29 Mar 2013 12:32:56 PM UTC, comment #1:

Also note that this (incorrect) behavior applies to the size
set by Gnash's --width and --height parameter too.

Nachanon Vetjasit <nachanon>
Fri 29 Mar 2013 12:19:34 PM UTC, original submission:

This bug is a spin-off from bug #37008 (SoundCloud issue).

SoundManager2's debug screen uses values from Stage.width and
Stage.height to set it's TextField size on startup without
listening for stage's size change event.

SoundManager2's SWF was compiled with 16x16 px size.

When displayed on the HTML page, for example
http://www.schillmania.com/projects/soundmanager2/troubleshoot/
Adobe Flash player takes width and height parameter from
<embed> tag, and use it as an initial Stage.width, Stage.height.
Thus, SoundManager2 gets the correct stage dimension
(500x200 px) and able to set TextField size accordingly.

But on Gnash, Stage.width and Stage.height were initially set to
SWF's dimension (16x16 px) regardless what <embed> tag said.
After SoundManager2's initialization code have already run,
Gnash then fires stage size change event with correct
stage dimension afterward.

The consequence is that TextField's display area was reduced
to a single character, making debug screen unusable.

Gnash: gnash 0.8.10-1~lenny, browser-plugin-gnash 0.8.10-1~lenny
from getgnash.org APT repository
Browser: iceweasel 3.0.6-3 from Debian repository (no addons)
System: Debian GNU/Linux 5.0 Lenny on i386

Nachanon Vetjasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27747:  stagesizetest.zip added by nachanon (4kB - application/zip - Test flash page and screenshots)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nachanon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Apr 2013 04:51:26 PM UTCnachanonAttached File-=>Added stagesizetest.zip, #27747

    Back to the top


    Powered by Savane 3.1-cleanup