[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10098: Drop unnecessary includes of
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10098: Drop unnecessary includes of MovieClip.h, add correct include to |
Date: |
Sat, 25 Oct 2008 17:44:08 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10098
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Sat 2008-10-25 17:44:08 +0200
message:
Drop unnecessary includes of MovieClip.h, add correct include to
sprite_deinition.h
Minor code cleanups.
Extend LoadVars test and make consistent.
modified:
gui/gtk.cpp
libcore/MovieClip.cpp
libcore/asobj/LoadVars_as.cpp
libcore/asobj/Object.cpp
libcore/asobj/Sound.cpp
libcore/asobj/XMLSocket_as.cpp
libcore/parser/sprite_definition.h
testsuite/actionscript.all/LoadVars.as
=== modified file 'gui/gtk.cpp'
--- a/gui/gtk.cpp 2008-10-24 21:39:58 +0000
+++ b/gui/gtk.cpp 2008-10-25 15:44:08 +0000
@@ -155,14 +155,16 @@
g_object_ref(G_OBJECT(_drawingArea));
_resumeButton = gtk_button_new();
- gtk_container_add(GTK_CONTAINER(_resumeButton), gtk_label_new(_("Click to
play")));
+ gtk_container_add(GTK_CONTAINER(_resumeButton),
+ gtk_label_new(_("Click to play")));
gtk_widget_show_all(_resumeButton);
// Same here.
g_object_ref(G_OBJECT(_resumeButton));
// This callback indirectly results in playHook() being called.
- g_signal_connect(G_OBJECT(_resumeButton), "clicked", G_CALLBACK
(menuitem_play_callback), this);
+ g_signal_connect(G_OBJECT(_resumeButton), "clicked",
+ G_CALLBACK(menuitem_play_callback), this);
// If we don't set this flag we won't be able to grab focus
// ( grabFocus() would be a no-op )
@@ -2543,7 +2545,8 @@
GtkGui::stopHook()
{
- // FIXME: this can't work for the stand-alone player, because _drawingArea
is
+ // FIXME: this can't work for the stand-alone player, because
+ // _drawingArea is
// packed into a vbox.
if (! _xid) return;
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2008-10-25 10:38:32 +0000
+++ b/libcore/MovieClip.cpp 2008-10-25 15:44:08 +0000
@@ -2489,7 +2489,8 @@
&movieclip_opaqueBackground);
o.init_property("scale9Grid", &movieclip_scale9Grid,
movieclip_scale9Grid);
- o.init_property("scrollRect", &movieclip_scrollRect,
&movieclip_scrollRect);
+ o.init_property("scrollRect", &movieclip_scrollRect,
+ &movieclip_scrollRect);
o.init_property("tabIndex", &movieclip_tabIndex, &movieclip_tabIndex);
o.init_property("transform", &movieClip_transform,
&movieClip_transform);
=== modified file 'libcore/asobj/LoadVars_as.cpp'
--- a/libcore/asobj/LoadVars_as.cpp 2008-10-23 18:27:11 +0000
+++ b/libcore/asobj/LoadVars_as.cpp 2008-10-25 15:44:08 +0000
@@ -264,9 +264,12 @@
if ( fn.nargs )
{
- std::stringstream ss;
- fn.dump_args(ss);
- log_unimpl("new LoadVars(%s) - arguments discarded",
ss.str().c_str()); // or ASERROR ?
+ IF_VERBOSE_ASCODING_ERRORS(
+ std::ostringstream ss;
+ fn.dump_args(ss);
+ log_aserror("new LoadVars(%s) - arguments discarded",
+ ss.str());
+ );
}
return as_value(obj.get()); // will keep alive
=== modified file 'libcore/asobj/Object.cpp'
--- a/libcore/asobj/Object.cpp 2008-10-25 10:38:32 +0000
+++ b/libcore/asobj/Object.cpp 2008-10-25 15:44:08 +0000
@@ -23,8 +23,6 @@
#include "as_object.h" // for inheritance
#include "builtin_function.h" // need builtin_function
#include "movie_definition.h" // for Object.registerClass
(get_exported_resource)
-//#include "character.h" // for Object.registerClass (get_root_movie)
-#include "MovieClip.h" // for Object.registerClass (get_movie_definition)
#include "sprite_definition.h" // for Object.registerClass
(get_movie_definition)
#include "VM.h" // for SWF version (attachObjectInterface)
#include "namedStrings.h" // for NSV::PROP_TO_STRING
=== modified file 'libcore/asobj/Sound.cpp'
--- a/libcore/asobj/Sound.cpp 2008-10-25 10:38:32 +0000
+++ b/libcore/asobj/Sound.cpp 2008-10-25 15:44:08 +0000
@@ -26,7 +26,6 @@
#include "sound_handler.h"
#include "sound_definition.h" // for sound_sample
#include "movie_definition.h"
-#include "MovieClip.h"
#include "fn_call.h"
#include "GnashException.h"
#include "builtin_function.h"
@@ -436,12 +435,6 @@
}
-
-
-
-
-
-
bool
Sound::getAudio(boost::uint8_t* stream, int len)
{
=== modified file 'libcore/asobj/XMLSocket_as.cpp'
--- a/libcore/asobj/XMLSocket_as.cpp 2008-10-25 10:38:32 +0000
+++ b/libcore/asobj/XMLSocket_as.cpp 2008-10-25 15:44:08 +0000
@@ -32,7 +32,6 @@
#include "timers.h"
#include "as_function.h"
#include "fn_call.h"
-#include "MovieClip.h"
#include "VM.h"
#include "builtin_function.h" // for setting timer, should likely avoid that..
#include "URLAccessManager.h"
=== modified file 'libcore/parser/sprite_definition.h'
--- a/libcore/parser/sprite_definition.h 2008-09-04 15:32:42 +0000
+++ b/libcore/parser/sprite_definition.h 2008-10-25 15:44:08 +0000
@@ -28,6 +28,7 @@
#include "log.h"
#include "rect.h"
#include "StringPredicates.h" // StringNoCaseLessThen
+#include "TagLoadersTable.h"
// Forward declarations
namespace gnash {
=== modified file 'testsuite/actionscript.all/LoadVars.as'
--- a/testsuite/actionscript.all/LoadVars.as 2008-10-13 08:56:32 +0000
+++ b/testsuite/actionscript.all/LoadVars.as 2008-10-25 15:44:08 +0000
@@ -175,15 +175,82 @@
// For checking that the data were loaded with XML.prototype.load.
x.onLoad = function(success) {
check_equals(x['var2'], 'val2');
+ check_totals(127);
play();
};
-// The two objects are also interchangeable for these functions.
-x.sendAndLoad = XML.prototype.sendAndLoad;
-check_equals(x.sendAndLoad("some server name", r), true);
-x.load = XML.prototype.load;
-check_equals(x.load( MEDIA(vars.txt) ), true);
-stop();
+// This is called from the next onLoad() handler to make sure there is no
+// race condition for end of test.
+checkXMLAndLoadVarsInterchangeable = function() {
+
+ // The two objects are also interchangeable for these functions.
+ x.sendAndLoad = XML.prototype.sendAndLoad;
+ check_equals(x.sendAndLoad("some server name", r), true);
+ x.load = XML.prototype.load;
+ stop();
+ check_equals(x.load( MEDIA(vars.txt) ), true);
+};
+
+//--------------------------------------------------------------------------
+// Test LoadVars::toString()
+//--------------------------------------------------------------------------
+
+lv = new LoadVars();
+lv.a = 3;
+xcheck_equals(lv.toString(), "a=3");
+
+lv.b = "string";
+xcheck_equals(lv.toString(), "b=string&a=3");
+
+lv.c = Mouse.hide;
+xcheck_equals(lv.toString(), "c=%5Btype%20Function%5D&b=string&a=3");
+
+lv["3"] = 6;
+xcheck_equals(lv.toString(), "3=6&c=%5Btype%20Function%5D&b=string&a=3");
+
+o = { a:5, b:6 };
+lv["f"] = o;
+xcheck_equals(lv.toString(),
"f=%5Bobject%20Object%5D&3=6&c=%5Btype%20Function%5D&b=string&a=3");
+
+lv[4] = "string";
+xcheck_equals(lv.toString(),
"4=string&f=%5Bobject%20Object%5D&3=6&c=%5Btype%20Function%5D&b=string&a=3");
+
+delete lv[3];
+delete lv["f"];
+xcheck_equals(lv.toString(), "4=string&c=%5Btype%20Function%5D&b=string&a=3");
+
+lv[o] = o;
+xcheck_equals(lv.toString(),
"%5Bobject%20Object%5D=%5Bobject%20Object%5D&4=string&c=%5Btype%20Function%5D&b=string&a=3");
+
+lv.b = undefined;
+#if OUTPUT_VERSION > 6
+xcheck_equals(lv.toString(),
"%5Bobject%20Object%5D=%5Bobject%20Object%5D&4=string&c=%5Btype%20Function%5D&b=undefined&a=3");
+#else
+xcheck_equals(lv.toString(),
"%5Bobject%20Object%5D=%5Bobject%20Object%5D&4=string&c=%5Btype%20Function%5D&b=&a=3");
+#endif
+
+tsc = 0;
+voc = 0;
+
+o = new Object();
+
+o.toString = function() { tsc++; return "fake toString"; };
+o.valueOf = function() { voc++; return "fake valueOf"; };
+
+lv2 = new LoadVars();
+lv2.a = o;
+check_equals(tsc, 0);
+check_equals(voc, 0);
+
+xcheck_equals(lv2.toString(), "a=fake%20toString");
+xcheck_equals(tsc, 1);
+check_equals(voc, 0);
+
+o.toString = undefined;
+xcheck_equals(lv2.toString(), "a=%5Btype%20Object%5D");
+xcheck_equals(tsc, 1);
+check_equals(voc, 0);
+
//--------------------------------------------------------------------------
// Test LoadVars::load()
@@ -230,9 +297,9 @@
// Gnash insists in looking for an ending & char !!
check_equals(loadvarsObj['var3'], 'val3\n');
- xcheck_totals(110);
+ checkXMLAndLoadVarsInterchangeable();
- play();
+ stop();
}
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10098: Drop unnecessary includes of MovieClip.h, add correct include to,
Benjamin Wolsey <=