gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1664-g0086f96
Date: Sat, 13 Jul 2013 22:15:38 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  0086f96aceb4727dc264f8a8341ae34798a01fc5 (commit)
       via  9a68f3e06260bd221ec6af15f13941072dc42618 (commit)
       via  e93616f79c811c15b259e19c67827ac350ca4ce4 (commit)
      from  d920f0656c86f47acabc64e6a7efd9f25c2b483f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=0086f96aceb4727dc264f8a8341ae34798a01fc5


commit 0086f96aceb4727dc264f8a8341ae34798a01fc5
Author: Bastiaan Jacques <address@hidden>
Date:   Sun Jul 14 00:09:39 2013 +0200

    Fix typo.

diff --git a/testsuite/misc-ming.all/Makefile.am 
b/testsuite/misc-ming.all/Makefile.am
index b0787e2..05e8d81 100644
--- a/testsuite/misc-ming.all/Makefile.am
+++ b/testsuite/misc-ming.all/Makefile.am
@@ -1551,7 +1551,7 @@ TEST_CASES = \
        callFunction_testrunner \
        duplicate_movie_clip_testrunner \
        duplicate_movie_clip_test2runner \
-       empty_clip_action_test \
+       empty_clip_action_testrunner \
        event_handler_scope_testrunner \
        masks_testrunner \
        masks_test2runner \

http://git.savannah.gnu.org/cgit//commit/?id=9a68f3e06260bd221ec6af15f13941072dc42618


commit 9a68f3e06260bd221ec6af15f13941072dc42618
Author: Bastiaan Jacques <address@hidden>
Date:   Sat Jul 13 23:44:09 2013 +0200

    Savannah #34686: skip empty onClip actions in PLACEOBJECT2.

diff --git a/libcore/swf/PlaceObject2Tag.cpp b/libcore/swf/PlaceObject2Tag.cpp
index 46cfbc5..cb63557 100644
--- a/libcore/swf/PlaceObject2Tag.cpp
+++ b/libcore/swf/PlaceObject2Tag.cpp
@@ -163,6 +163,14 @@ PlaceObject2Tag::readPlaceActions(SWFStream& in)
                 );
                 break;
             }
+
+            if ( event_length == 0 ) {
+                IF_VERBOSE_MALFORMED_SWF(
+                log_swferror(_("swf_event::read(), "
+                    "event_length = 0 (empty). Skipping."));
+                );
+                continue;
+            }
     
             key::code ch = key::INVALID;
             

http://git.savannah.gnu.org/cgit//commit/?id=e93616f79c811c15b259e19c67827ac350ca4ce4


commit e93616f79c811c15b259e19c67827ac350ca4ce4
Author: Bastiaan Jacques <address@hidden>
Date:   Sat Jul 13 23:32:44 2013 +0200

    Savannah #34686: Add a hacky test.

diff --git a/testsuite/misc-ming.all/Makefile.am 
b/testsuite/misc-ming.all/Makefile.am
index 17ea13b..b0787e2 100644
--- a/testsuite/misc-ming.all/Makefile.am
+++ b/testsuite/misc-ming.all/Makefile.am
@@ -148,6 +148,7 @@ check_PROGRAMS = \
        callFunction_test \
        duplicate_movie_clip_test \
        duplicate_movie_clip_test2 \
+       empty_clip_action_test \
        event_handler_scope_test \
        masks_testrunner \
        key_event_test \
@@ -237,6 +238,7 @@ check_SCRIPTS = \
        callFunction_testrunner \
        duplicate_movie_clip_testrunner \
        duplicate_movie_clip_test2runner \
+       empty_clip_action_testrunner \
        event_handler_scope_testrunner \
        matrix_testrunner \
        static_vs_dynamic1_testrunner \
@@ -857,6 +859,19 @@ duplicate_movie_clip_test2runner: 
$(srcdir)/../generic-testrunner.sh duplicate_m
        chmod 755 $@
 
 
+empty_clip_action_test_SOURCES =       \
+       empty_clip_action_test.c        \
+       $(NULL)
+empty_clip_action_test_LDADD = libgnashmingutils.la
+
+empty_clip_action_test.swf: empty_clip_action_test
+       ./empty_clip_action_test $(abs_mediadir)
+
+empty_clip_action_testrunner: $(srcdir)/../generic-testrunner.sh 
empty_clip_action_test.swf
+       sh $(srcdir)/../generic-testrunner.sh -r5 $(top_builddir) 
empty_clip_action_test.swf > $@
+       chmod 755 $@
+
+
 event_handler_scope_test_SOURCES =     \
        event_handler_scope_test.c      \
        $(NULL)
@@ -1536,6 +1551,7 @@ TEST_CASES = \
        callFunction_testrunner \
        duplicate_movie_clip_testrunner \
        duplicate_movie_clip_test2runner \
+       empty_clip_action_test \
        event_handler_scope_testrunner \
        masks_testrunner \
        masks_test2runner \
diff --git a/testsuite/misc-ming.all/empty_clip_action_test.c 
b/testsuite/misc-ming.all/empty_clip_action_test.c
new file mode 100644
index 0000000..1577c5e
--- /dev/null
+++ b/testsuite/misc-ming.all/empty_clip_action_test.c
@@ -0,0 +1,127 @@
+/*
+ *   Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */ 
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+#include <assert.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION  6
+#define OUTPUT_FILENAME  "empty_clip_action_test.swf"
+
+// So this is about as hacky as you get.  The idea is that we change the
+// CHANGEOBJECT2 tag so that the first action (containing just a single
+// null-byte) is truncated to nothing: event_length is updated to zero, the
+// following two bytes are skipped and then of course the tag length itself has
+// to be reduced by one.
+
+// So far as I'm aware you can't do this programmatically in Ming, but of
+// course if the output stream ever changes this will be completely broken. 
+void spesiulOutputMethod(byte b, void *data);
+void spesiulOutputMethod(byte b, void *data)
+{
+    static long count = 0;
+    byte c = b;
+    FILE *f = (FILE *)data;
+
+    if (count == 0x293b) {
+        assert( b == 122);
+        c = 120;
+    }
+    if (count == 0x2953) {
+        assert( b == 2);
+        c = 0;
+    }
+    if (count == 0x2954 || count == 0x2955) {
+         assert( b == 0);
+         ++count;
+         return;
+    }
+
+    fputc(c, f);
+    ++count;
+}
+
+
+
+int
+main(int argc, char** argv)
+{
+  SWFMovie mo;
+  SWFMovieClip  mc2, dejagnuclip;
+  SWFDisplayItem it2;
+  FILE* fh;
+
+  const char *srcdir=".";
+  if ( argc>1 ) 
+    srcdir=argv[1];
+  else
+  {
+      fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+      return 1;
+  }
+
+  Ming_init();
+  mo = newSWFMovieWithVersion(OUTPUT_VERSION);
+  SWFMovie_setDimension(mo, 800, 600);
+  SWFMovie_setRate (mo, 12.0);
+
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  add_actions(mo, "x2=0;");
+  SWFMovie_nextFrame(mo);  /* 1st frame */
+
+  
+  mc2 = newSWFMovieClip();
+
+  it2 = SWFMovie_add(mo, (SWFBlock)mc2); 
+  SWFDisplayItem_setDepth(it2, 20); 
+  SWFDisplayItem_setName(it2, "mc2"); 
+  SWFDisplayItem_addAction(it2,
+    compileSWFActionCode(""),
+    SWFACTION_KEYPRESS);  
+  SWFDisplayItem_addAction(it2,
+    compileSWFActionCode(" _root.note('onClipEnterFrame triggered'); "
+                         " _root.x2 = 14; "),
+    SWFACTION_ENTERFRAME);  
+
+  SWFMovie_nextFrame(mo); /* 2nd frame */
+  
+  check_equals(mo, "_root.x2", "14"); 
+  SWFMovie_nextFrame(mo); /* 3rd frame */
+  
+  SWFDisplayItem_remove(it2);
+
+  SWFMovie_nextFrame(mo); /* 4th frame */
+
+  add_actions(mo, " _root.totals(); stop(); ");
+  SWFMovie_nextFrame(mo); /* 5th frame */
+
+  // Output movie
+  puts("Saving " OUTPUT_FILENAME );
+
+  // ..but wait! Now entering crazy-land.
+  fh = fopen(OUTPUT_FILENAME, "w");
+  SWFMovie_output(mo, spesiulOutputMethod, fh);
+  fclose(fh);
+  return 0;
+}
+

-----------------------------------------------------------------------

Summary of changes:
 libcore/swf/PlaceObject2Tag.cpp                    |    8 ++
 testsuite/misc-ming.all/Makefile.am                |   16 +++
 ...ndler_scope_test.c => empty_clip_action_test.c} |  105 ++++++++++++--------
 3 files changed, 87 insertions(+), 42 deletions(-)
 copy testsuite/misc-ming.all/{event_handler_scope_test.c => 
empty_clip_action_test.c} (50%)


hooks/post-receive
-- 
Gnash



reply via email to

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