[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/character.cpp testsuite/...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/character.cpp testsuite/... |
Date: |
Wed, 30 Apr 2008 16:16:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/04/30 16:16:43
Modified files:
. : ChangeLog
server : character.cpp
testsuite/actionscript.all: MovieClip.as
Log message:
* server/character.cpp (alpha_getset): undefined, null and nan
values are not valid input to _alpha setter.
* testsuite/actionscript.all/MovieClip.as: success for all newly
added _alpha tests.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6466&r2=1.6467
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.131&r2=1.132
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6466
retrieving revision 1.6467
diff -u -b -r1.6466 -r1.6467
--- ChangeLog 30 Apr 2008 16:06:33 -0000 1.6466
+++ ChangeLog 30 Apr 2008 16:16:41 -0000 1.6467
@@ -1,3 +1,10 @@
+2008-04-30 Sandro Santilli <address@hidden>
+
+ * server/character.cpp (alpha_getset): undefined, null and nan
+ values are not valid input to _alpha setter.
+ * testsuite/actionscript.all/MovieClip.as: success for all newly
+ added _alpha tests.
+
2008-04-28 Russ Nelson <address@hidden>
* resolve http://savannah.gnu.org/bugs/?22973 by adding a test
Index: server/character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/character.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- server/character.cpp 28 Apr 2008 09:04:02 -0000 1.95
+++ server/character.cpp 30 Apr 2008 16:16:43 -0000 1.96
@@ -392,9 +392,21 @@
}
else // setter
{
+ as_value& inval = fn.arg(0);
+ double input = inval.to_number();
+ if ( inval.is_undefined() || inval.is_null() || !
isfinite(input) )
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror(_("Ignored attempt to set %s.%s=%s"),
+ ptr->getTarget(),
+ _("_alpha"), // trying to reuse translations
+ fn.arg(0).to_debug_string());
+ );
+ return rv;
+ }
// Set alpha modulate, in percent.
cxform cx = ptr->get_cxform();
- cx.m_[3][0] = std::infinite_to_fzero(fn.arg(0).to_number()) /
100.f;
+ cx.m_[3][0] = input / 100.f; // std::infinite_to_fzero(input) /
100.f;
ptr->set_cxform(cx);
ptr->transformedByScript(); // m_accept_anim_moves = false;
}
Index: testsuite/actionscript.all/MovieClip.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- testsuite/actionscript.all/MovieClip.as 30 Apr 2008 15:42:00 -0000
1.131
+++ testsuite/actionscript.all/MovieClip.as 30 Apr 2008 16:16:43 -0000
1.132
@@ -20,9 +20,9 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: MovieClip.as,v 1.131 2008/04/30 15:42:00 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.132 2008/04/30 16:16:43 strk Exp $";
-rcsid="$Id: MovieClip.as,v 1.131 2008/04/30 15:42:00 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.132 2008/04/30 16:16:43 strk Exp $";
#include "check.as"
// To be called at end of test
@@ -1223,7 +1223,7 @@
_alpha = "string";
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 100);
+check_equals(_alpha, 100);
_alpha = 25;
check_equals(_alpha, 25);
@@ -1235,23 +1235,23 @@
_alpha = undefined;
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 50);
+check_equals(_alpha, 50);
_alpha = null;
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 50);
+check_equals(_alpha, 50);
_alpha = NaN;
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 50);
+check_equals(_alpha, 50);
_alpha = Infinite;
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 50);
+check_equals(_alpha, 50);
_alpha = 0/0;
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 50);
+check_equals(_alpha, 50);
_alpha = -50;
check_equals(typeof(_alpha), 'number');
@@ -1262,13 +1262,13 @@
#if OUTPUT_VERSION < 7
check_equals(_alpha, 0);
#else
- xcheck_equals(_alpha, -50);
+ check_equals(_alpha, -50);
#endif
_alpha = 100;
_alpha = -(0/0);
check_equals(typeof(_alpha), 'number');
-xcheck_equals(_alpha, 100);
+check_equals(_alpha, 100);
_alpha = 100;