[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. c3ea60e58a8898ed5f4a
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. c3ea60e58a8898ed5f4ac9844fc02b75b4b59002 |
Date: |
Tue, 28 Sep 2010 09:20:20 +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 c3ea60e58a8898ed5f4ac9844fc02b75b4b59002 (commit)
via ab97b0616b6282c32b078d7a930b3442da431e72 (commit)
via cf9688ce4bed8b70f8a084999500f9867f087f62 (commit)
from 1f2f4ef894932823048a196fb725d5ed5841ddf2 (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=c3ea60e58a8898ed5f4ac9844fc02b75b4b59002
commit c3ea60e58a8898ed5f4ac9844fc02b75b4b59002
Author: Benjamin Wolsey <address@hidden>
Date: Tue Sep 28 10:32:21 2010 +0200
Constness.
diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index 79b66ed..b692d3e 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -128,7 +128,7 @@ TextField::TextField(as_object* object, DisplayObject*
parent,
if (!f) f = fontlib::get_default_font();
setFont(f);
- int version = getSWFVersion(*object);
+ const int version = getSWFVersion(*object);
// set default text *before* calling registerTextVariable
// (if the textvariable already exist and has a value
@@ -792,7 +792,7 @@ TextField::topmostMouseEntity(boost::int32_t x,
boost::int32_t y)
void
TextField::updateText(const std::string& str)
{
- int version = getSWFVersion(*getObject(this));
+ const int version = getSWFVersion(*getObject(this));
const std::wstring& wstr = utf8::decodeCanonicalString(str, version);
updateText(wstr);
}
@@ -850,7 +850,7 @@ TextField::setHtmlTextValue(const std::wstring& wstr)
as_object* tgt = ref.first;
if ( tgt )
{
- int version = getSWFVersion(*getObject(this));
+ const int version = getSWFVersion(*getObject(this));
// we shouldn't truncate, right?
tgt->set_member(ref.second, utf8::encodeCanonicalString(wstr,
version));
@@ -883,7 +883,7 @@ TextField::setTextValue(const std::wstring& wstr)
as_object* tgt = ref.first;
if ( tgt )
{
- int version = getSWFVersion(*getObject(this));
+ const int version = getSWFVersion(*getObject(this));
// we shouldn't truncate, right?
tgt->set_member(ref.second, utf8::encodeCanonicalString(wstr,
version));
@@ -919,7 +919,7 @@ std::string
TextField::get_htmltext_value() const
{
const_cast<TextField*>(this)->registerTextVariable();
- int version = getSWFVersion(*getObject(const_cast<TextField*>(this)));
+ const int version =
getSWFVersion(*getObject(const_cast<TextField*>(this)));
return utf8::encodeCanonicalString(_htmlText, version);
}
http://git.savannah.gnu.org/cgit//commit/?id=ab97b0616b6282c32b078d7a930b3442da431e72
commit ab97b0616b6282c32b078d7a930b3442da431e72
Author: Benjamin Wolsey <address@hidden>
Date: Tue Sep 28 10:31:57 2010 +0200
Use version for text value. Fixes latest test.
diff --git a/libcore/MovieClip.cpp b/libcore/MovieClip.cpp
index 96e7bf9..d5234f1 100644
--- a/libcore/MovieClip.cpp
+++ b/libcore/MovieClip.cpp
@@ -737,7 +737,7 @@ MovieClip::setTextFieldVariables(const ObjectURI& uri,
const as_value& val)
if (!etc) return false;
for (TextFields::iterator i=etc->begin(), e=etc->end(); i!=e; ++i) {
- (*i)->updateText(val.to_string());
+ (*i)->updateText(val.to_string(getSWFVersion(*getObject(this))));
}
return true;
}
diff --git a/testsuite/actionscript.all/TextField.as
b/testsuite/actionscript.all/TextField.as
index 0892000..4d70d95 100644
--- a/testsuite/actionscript.all/TextField.as
+++ b/testsuite/actionscript.all/TextField.as
@@ -770,7 +770,7 @@ mc45.createTextField("tf45", 0, 0, 100, 100,
getNextHighestDepth());
mc45.tf45.variable = "_root.mc45.vari";
_root.mc45.vari = undefined;
#if OUTPUT_VERSION < 7
-xcheck_equals(mc45.tf45.text, "");
+check_equals(mc45.tf45.text, "");
#else
check_equals(mc45.tf45.text, "undefined");
#endif
http://git.savannah.gnu.org/cgit//commit/?id=cf9688ce4bed8b70f8a084999500f9867f087f62
commit cf9688ce4bed8b70f8a084999500f9867f087f62
Author: Benjamin Wolsey <address@hidden>
Date: Tue Sep 28 10:31:10 2010 +0200
Test undefined value for TextField.variable.
diff --git a/testsuite/actionscript.all/TextField.as
b/testsuite/actionscript.all/TextField.as
index 5dbceb9..0892000 100644
--- a/testsuite/actionscript.all/TextField.as
+++ b/testsuite/actionscript.all/TextField.as
@@ -763,6 +763,18 @@ xcheck_equals(tf.text, "from object again"); // but
updating o.t still doesn't t
tf.text = "and forever back";
check_equals(o.t, "and forever back"); // while updating textfield's text
updates o.t
+// Test value of variable if the property is present but undefined.
+
+mc45 = _root.createEmptyMovieClip("mc45", getNextHighestDepth());
+mc45.createTextField("tf45", 0, 0, 100, 100, getNextHighestDepth());
+mc45.tf45.variable = "_root.mc45.vari";
+_root.mc45.vari = undefined;
+#if OUTPUT_VERSION < 7
+xcheck_equals(mc45.tf45.text, "");
+#else
+check_equals(mc45.tf45.text, "undefined");
+#endif
+
//-------------------------------------------------------------------------
// TODO: check TextField.getDepth()
//-------------------------------------------------------------------------
@@ -1287,11 +1299,11 @@ o = new CTF();
//------------------------------------------------------------
#if OUTPUT_VERSION == 6
- check_totals(525);
+ check_totals(526);
#elif OUTPUT_VERSION == 7
- check_totals(549);
-#elif OUTPUT_VERSION == 8
check_totals(550);
+#elif OUTPUT_VERSION == 8
+ check_totals(551);
#endif
#endif
-----------------------------------------------------------------------
Summary of changes:
libcore/MovieClip.cpp | 2 +-
libcore/TextField.cpp | 10 +++++-----
testsuite/actionscript.all/TextField.as | 18 +++++++++++++++---
3 files changed, 21 insertions(+), 9 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. c3ea60e58a8898ed5f4ac9844fc02b75b4b59002,
Benjamin Wolsey <=