[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/string_table.cpp server...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/string_table.cpp server... |
Date: |
Wed, 06 Feb 2008 10:18:31 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/02/06 10:18:31
Modified files:
. : ChangeLog
libbase : string_table.cpp
server : namedStrings.cpp namedStrings.h textformat.cpp
Log message:
Drop the the PROP_COLOR named string, clashing with CLASS_COLOR in SWF6
or lower (case insensitive). Don't lowercase all named string, but only
their comparison key when in case-insensitive mode.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5567&r2=1.5568
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/string_table.cpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/namedStrings.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/server/namedStrings.h?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/textformat.cpp?cvsroot=gnash&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5567
retrieving revision 1.5568
diff -u -b -r1.5567 -r1.5568
--- ChangeLog 6 Feb 2008 10:15:06 -0000 1.5567
+++ ChangeLog 6 Feb 2008 10:18:30 -0000 1.5568
@@ -1,5 +1,14 @@
2008-02-06 Sandro Santilli <address@hidden>
+ * libbase/string_table.cpp (insert_group): only lowercase
+ the comparison key if case-insensitive.
+ * server/namedStrings.{cpp,h}: drop PROP_COLOR named string
+ as it would clash with the CLASS_COLOR one in case-insensitive
+ runs. Fixes unstable evaluation of "color" labels.
+ * server/textformat.cpp: don't use PROP_COLOR anymore (was dropped).
+
+2008-02-06 Sandro Santilli <address@hidden>
+
* testsuite/actionscript.all/case.as: add tests showing that
the current case-insensitive string_table comparison is
conceptually bogus (and probably the whole global string_table
Index: libbase/string_table.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/string_table.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- libbase/string_table.cpp 29 Jan 2008 07:13:23 -0000 1.6
+++ libbase/string_table.cpp 6 Feb 2008 10:18:30 -0000 1.7
@@ -105,6 +105,10 @@
boost::to_lower(pList[i].mValue);
boost::to_lower(pList[i].mComp);
}
+ else if (mCaseInsensitive)
+ {
+ boost::to_lower(pList[i].mComp);
+ }
// The keys don't have to be consecutive, so any time we find a
key
// that is too big, jump a few keys to avoid rewriting this on
every item.
Index: server/namedStrings.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/namedStrings.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/namedStrings.cpp 29 Jan 2008 07:13:23 -0000 1.11
+++ server/namedStrings.cpp 6 Feb 2008 10:18:31 -0000 1.12
@@ -35,7 +35,7 @@
string_table::svt( "broadcastMessage", NSV::PROP_BROADCAST_MESSAGE ),
string_table::svt( "bullet", NSV::PROP_BULLET ),
string_table::svt( "callee", NSV::PROP_CALLEE ),
- string_table::svt( "color", NSV::PROP_COLOR ),
+ //string_table::svt( "color", NSV::PROP_COLOR ), // clashes with
CLASS_COLOR in case-insensitive mode
string_table::svt( "constructor", NSV::PROP_CONSTRUCTOR ),
string_table::svt( "__constructor__", NSV::PROP_uuCONSTRUCTORuu ),
string_table::svt( "_currentframe", NSV::PROP_uCURRENTFRAME ),
@@ -181,7 +181,7 @@
{
if (version < 7)
{
- table->lower_next_group();
+ //table->lower_next_group();
table->set_insensitive();
}
Index: server/namedStrings.h
===================================================================
RCS file: /sources/gnash/gnash/server/namedStrings.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/namedStrings.h 21 Jan 2008 20:55:51 -0000 1.12
+++ server/namedStrings.h 6 Feb 2008 10:18:31 -0000 1.13
@@ -57,7 +57,7 @@
PROP_BROADCAST_MESSAGE,
PROP_BULLET,
PROP_CALLEE,
- PROP_COLOR,
+ //PROP_COLOR, // clashes with CLASS_COLOR in case-insensitive
mode
PROP_CONSTRUCTOR,
PROP_uuCONSTRUCTORuu,
PROP_uCURRENTFRAME,
Index: server/textformat.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/textformat.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- server/textformat.cpp 21 Jan 2008 20:55:53 -0000 1.32
+++ server/textformat.cpp 6 Feb 2008 10:18:31 -0000 1.33
@@ -17,13 +17,14 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-// $Id: textformat.cpp,v 1.32 2008/01/21 20:55:53 rsavoye Exp $
+// $Id: textformat.cpp,v 1.33 2008/02/06 10:18:31 strk Exp $
#include "log.h"
#include "textformat.h"
#include "fn_call.h"
#include "builtin_function.h" // for getter/setter properties
#include "namedStrings.h"
+#include "VM.h"
namespace gnash {
@@ -144,6 +145,8 @@
boost::intrusive_ptr<textformat_as_object> ptr =
ensureType<textformat_as_object>(fn.this_ptr);
//double start = fn.arg(0).to_number();
//double end = fn.arg(1).to_number();
+ VM& vm = ptr->getVM();
+ string_table& st = vm.getStringTable();
if ( fn.nargs < 3 )
{
@@ -186,7 +189,10 @@
obj->obj.bulletSet(method.to_bool());
}
- if (obj->get_member(NSV::PROP_COLOR, &method)) {
+ // Can't use a named string here with current model, as a "color"
+ // named string would clash with the "Color" class in SWF6 and below
+ // (but not in SWF7 and above)
+ if (obj->get_member(st.find("color"), &method)) {
//log_msg(_("Color exists and is set to %f", method.to_number());
obj->obj.colorSet((boost::uint32_t)method.to_number());
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/string_table.cpp server...,
Sandro Santilli <=