gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp test...
Date: Wed, 13 Dec 2006 09:38:16 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/13 09:38:16

Modified files:
        .              : ChangeLog 
        server         : sprite_instance.cpp 
        testsuite/misc-ming.all: VarAndCharClashTest.as 

Log message:
                * server/sprite_instance.cpp (set_member): don't attempt to set 
the
                  value of a character in the DisplayList, see 
VarAndCharClashTest.swf
                  testcase; (get_member): give object members precedence over
                  characters in DisplayList -- should be tested what happens 
with
                  "inherited" members..
                * testsuite/misc-ming.all/VarAndCharClashTest.as: don't expect
                  any failure.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1925&r2=1.1926
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/VarAndCharClashTest.as?cvsroot=gnash&r1=1.2&r2=1.3

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1925
retrieving revision 1.1926
diff -u -b -r1.1925 -r1.1926
--- ChangeLog   13 Dec 2006 02:04:47 -0000      1.1925
+++ ChangeLog   13 Dec 2006 09:38:16 -0000      1.1926
@@ -1,5 +1,15 @@
 2006-12-13 Sandro Santilli <address@hidden>
 
+       * server/sprite_instance.cpp (set_member): don't attempt to set the
+         value of a character in the DisplayList, see VarAndCharClashTest.swf
+         testcase; (get_member): give object members precedence over
+         characters in DisplayList -- should be tested what happens with
+         "inherited" members..
+       * testsuite/misc-ming.all/VarAndCharClashTest.as: don't expect
+         any failure.
+
+2006-12-13 Sandro Santilli <address@hidden>
+
        * testsuite/misc-ming.all/VarAndCharClashTest.as:
          added more tests, dissipating some of the cloud...
 

Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- server/sprite_instance.cpp  12 Dec 2006 22:41:05 -0000      1.105
+++ server/sprite_instance.cpp  13 Dec 2006 09:38:16 -0000      1.106
@@ -1411,8 +1411,36 @@
            return true;
        }
 
-       // Not a built-in property.  Check items on our
-       // display list.
+       // Try object members, BEFORE display list items!
+       // (see testcase VarAndCharClash.swf in testsuite/misc-ming.all)
+       //
+       if ( get_member_default(name, val) )
+       {
+
+// ... trying to be useful to Flash coders ...
+// The check should actually be performed before any return
+// prior to the one due to a match in the DisplayList.
+// It's off by default anyway, so not a big deal.
+// See bug #18457
+//#define CHECK_FOR_NAME_CLASHES 1
+#ifdef CHECK_FOR_NAME_CLASHES
+               IF_VERBOSE_ASCODING_ERRORS(
+               if (  
m_display_list.get_character_by_name_i(std::string(name.c_str())));
+               {
+                       log_warning("A variable name (%s) clashes with "
+                                       "the name of an existing character "
+                                       "in the display list! "
+                                       "The variable will hide the "
+                                       "character.", name.c_str());
+               }
+               );
+#endif
+
+               return true;
+       }
+
+
+       // Try items on our display list.
        character* ch = 
m_display_list.get_character_by_name_i(std::string(name.c_str()));
        if (ch)
        {
@@ -1426,10 +1454,10 @@
        if ( etc )
        {
                val->set_string(etc->get_text_value());
+               return true;
        }
 
-       // Invoke the default get_member 
-       return get_member_default(name, val);
+       return false;
 
 }
 
@@ -1855,6 +1883,14 @@
                }
        }       // end switch
 
+#ifdef DEBUG_DYNTEXT_VARIABLES
+log_msg(" not a standard member");
+#endif
+
+
+#if 0 // we'd need a testcase for this, my "short" tests show
+      // that a textfield variable cannot be assigned to like this
+
        // Not a built-in property.  See if we have a
        // matching edit_text character in our display
        // list.
@@ -1875,8 +1911,10 @@
        }
 
 #ifdef DEBUG_DYNTEXT_VARIABLES
-log_msg(" not a standard member nor a character");
+       log_msg(" not a character");
 #endif
+#endif
+
 
        // Try textfield variables
        //

Index: testsuite/misc-ming.all/VarAndCharClashTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/VarAndCharClashTest.as,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/VarAndCharClashTest.as      13 Dec 2006 02:04:47 
-0000      1.2
+++ testsuite/misc-ming.all/VarAndCharClashTest.as      13 Dec 2006 09:38:16 
-0000      1.3
@@ -23,8 +23,8 @@
 
 // The *new* 'green' variable is no more a movieclip
 check(green instanceOf Number);
-xcheck_equals(typeof(green), 'object');
-xcheck_equals(green._y, undefined);
+check_equals(typeof(green), 'object');
+check_equals(green._y, undefined);
 
 // print totals and stop to avoid infinite loops
 totals();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]