patchGnash - The GNU Flash player - Patches: patch #8904, Patches to fix special stroke size...


You are not allowed to post comments on this tracker with your current authentication level.

patch #8904: Patches to fix special stroke size handling in `MovieClip.lineStyle()`

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Fri 05 Feb 2016 06:42:25 AM UTC
Category:  core Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  strk Open/Closed:  Open

Wed 11 May 2016 06:26:07 PM UTC, comment #4: 

Chances to see tests for testsuite/misc-ming.all/, and the corresponding DrawingApiTestRunner.cpp  ?

Sandro Santilli <strk>
Group Member
Mon 22 Feb 2016 09:10:14 AM UTC, comment #3: 

Patch 2 pushed as commit 982270fff22b80f7d3872f3696f4636053894ca4

Sandro Santilli <strk>
Group Member
Thu 18 Feb 2016 11:28:23 AM UTC, comment #2: 

Patch 2 of 2:
See the attached `0002_treat-impossible-line-size-as-zero.patch`.

Current Gnash's implementation `MovieClip.lineStyle()` treats line thickness
of `Infinity` as 255, while Flash Player treats it (together as other
impossible line size like negative number, and NaN) as 0.

This patch adds a special-case check to `MovieClip.lineStyle()` which
explicitly set the line size to zero (hairline stroke) when `Infinity`,
`-Infinity` or `NaN` line size value is encountered.

Automated tests will follow as a separate patch entry.


Gnash: 0.8.11dev (patched against git 051aa9c 15-Feb-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #36380)

Nutchanon Wetchasit <nachanon>
Sat 06 Feb 2016 12:01:11 PM UTC, comment #1: 

Pushed as commit 5dd3e016bef83cc0368fa1fdca8ffcb58d811e89

We have some drawing API tests in testsuite/misc-ming.all/, and the corresponding DrawingApiTestRunner.cpp

I hope you'll find it easy to add tests to

Sandro Santilli <strk>
Group Member
Fri 05 Feb 2016 06:42:25 AM UTC, original submission:  

Current Gnash's implementation of `MovieClip.lineStyle()` has an incorrect
handling of `thickness` argument when it have special value like
`undefined` or `Infinity`, a.k.a. bug #45731.

Patch 1 of 2:
See the attached `0001_reset-line-style-on-undefined-stroke.patch`.

Original code of `MovieCLip.lineStyle()` implementation already resets
line style when the method was called without any argument, but it doesn't
reset line style when `thickness` argument is specified as `undefined`,
and left it to number conversion code's interpretation, which results
in hairline (width 0) stroke.

This patch extends the condition check to cover the case where
`thickness` argument is specified, but as `undefined`, which has
essentially the same meaning; partially fixing bug #45731.

Gnash: 0.8.11dev (patched against git 02ec1e6 3-Feb-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>


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

Attached Files
file #36380:  0002_treat-impossible-line-size-as-zero.patch added by nachanon (1KiB - application/octet-stream - Patch to make `MovieClip.lineStyle()` treat `Infinity` line thickness as hairline stroke)
file #36250:  0001_reset-line-style-on-undefined-stroke.patch added by nachanon (698B - text/x-patch - Patch to make `MovieClip.lineStyle()` disable line drawing on `undefined` line thickness)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-18 nachanon Attached File- Added 0002_treat-impossible-line-size-as-zero.patch, #36380
    2016-02-06 strk StatusNone Ready For Test
        Assigned toNone strk
    2016-02-05 nachanon Attached File- Added 0001_reset-line-style-on-undefined-stroke.patch, #36250

    Back to the top

    Powered by Savane 3.13-8484.
    Corresponding source code