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()`

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Fri 05 Feb 2016 06:42:25 AM UTC  
 
Category: corePriority: 5 - Normal
Status: Ready For TestPrivacy: Public
Assigned to: Sandro Santilli <strk>Open/Closed: Open

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

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

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 22 Feb 2016 09:10:14 AM UTC, comment #3:

Patch 2 pushed as commit 982270fff22b80f7d3872f3696f4636053894ca4

Sandro Santilli <strk>
Project MemberIn charge of this item.
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.

Note:

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/DrawingApiTest.as, and the corresponding DrawingApiTestRunner.cpp

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

Sandro Santilli <strk>
Project MemberIn charge of this item.
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>

 

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
  • -unavailable- added by strk (Posted a comment)
  • -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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 18 Feb 2016 11:28:23 AM UTCnachanonAttached File-=>Added 0002_treat-impossible-line-size-as-zero.patch, #36380
    Sat 06 Feb 2016 12:01:11 PM UTCstrkStatusNone=>Ready For Test
      Assigned toNone=>strk
    Fri 05 Feb 2016 06:42:25 AM UTCnachanonAttached File-=>Added 0001_reset-line-style-on-undefined-stroke.patch, #36250

    Back to the top


    Powered by Savane 3.1-cleanup1