[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10233: Fix abort in delete2 and cor
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10233: Fix abort in delete2 and correct implementation after testing. |
Date: |
Thu, 06 Nov 2008 21:03:12 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10233
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2008-11-06 21:03:12 +0100
message:
Fix abort in delete2 and correct implementation after testing.
TextField cleanup and implementation.
removed:
libcore/parser/edit_text_character_def.cpp
libcore/parser/edit_text_character_def.h
added:
libcore/swf/DefineEditTextTag.cpp
libcore/swf/DefineEditTextTag.h
modified:
libcore/Makefile.am
libcore/MovieClip.cpp
libcore/TextField.cpp
libcore/TextField.h
libcore/as_environment.cpp
libcore/as_environment.h
libcore/asobj/TextFormat.cpp
libcore/asobj/TextFormat.h
libcore/impl.cpp
libcore/parser/Makefile.am
libcore/swf/tag_loaders.cpp
libcore/swf/tag_loaders.h
libcore/vm/ASHandlers.cpp
libcore/vm/ActionExec.cpp
testsuite/actionscript.all/TextField.as
testsuite/actionscript.all/delete.as
testsuite/misc-ming.all/DefineEditTextTest.c
testsuite/swfdec/PASSING
------------------------------------------------------------
revno: 10229.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 12:56:50 +0100
message:
Move DefineEditText parsing to swf/DefineEditTextTag and make consistent
with the parsing style in that directory. Drop pointer to definition (now
tag) in TextField, as there is nothing immutable.
MovieClip now constructs the TextField character directly using a second
constructor, instead of faking a definition first.
removed:
libcore/parser/edit_text_character_def.cpp
libcore/parser/edit_text_character_def.h
modified:
libcore/Makefile.am
libcore/MovieClip.cpp
libcore/TextField.cpp
libcore/TextField.h
libcore/asobj/TextFormat.cpp
libcore/asobj/TextFormat.h
libcore/impl.cpp
libcore/parser/Makefile.am
libcore/swf/tag_loaders.cpp
libcore/swf/tag_loaders.h
------------------------------------------------------------
revno: 10229.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 12:59:52 +0100
message:
Add the new tag parser.
added:
libcore/swf/DefineEditTextTag.cpp
libcore/swf/DefineEditTextTag.h
------------------------------------------------------------
revno: 10229.1.3
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 13:12:06 +0100
message:
Fix maxChars (it does not limit the length of the text, but is rather for
limiting user input). Store defaultText so the testsuite passes again.
modified:
libcore/TextField.cpp
libcore/TextField.h
------------------------------------------------------------
revno: 10229.1.4
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 14:56:00 +0100
message:
Restore a (now optional) definition to the static TextField, as the
default
text appears to be immutable. The presence of a definition can be used to
distinguish between static and dynamic TextField. The updateText()
function
should apparently only restore the default text if there is a definition.
TextField.variable returns null if the variable name is empty, which also
happens when undefined or null is passed.
Implement TextField.text setter.
modified:
libcore/MovieClip.cpp
libcore/TextField.cpp
libcore/TextField.h
libcore/swf/DefineEditTextTag.cpp
libcore/swf/DefineEditTextTag.h
testsuite/actionscript.all/TextField.as
------------------------------------------------------------
revno: 10229.1.5
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 15:03:09 +0100
message:
Update swfdec PASSING. Mostly new tests, three fixes from TextField.
modified:
testsuite/swfdec/PASSING
------------------------------------------------------------
revno: 10229.1.6
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 15:04:55 +0100
message:
misc-ming.all TextField pass (TextField.text implemented).
modified:
testsuite/misc-ming.all/DefineEditTextTest.c
------------------------------------------------------------
revno: 10229.1.7
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 16:59:49 +0100
message:
Don't override get/set member for text or htmlText property. Return
something
for TextField.text and TextField.htmlText, though the first is definitely
wrong and the second untested.
modified:
libcore/TextField.cpp
------------------------------------------------------------
revno: 10229.1.8
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 20:04:35 +0100
message:
Test malformed deletes. Fix abort and implement most of the delete
modes. One failure on an odd result still.
modified:
libcore/as_environment.cpp
libcore/as_environment.h
libcore/vm/ASHandlers.cpp
libcore/vm/ActionExec.cpp
testsuite/actionscript.all/delete.as
------------------------------------------------------------
revno: 10229.1.9
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 20:20:46 +0100
message:
Different behaviour according to version. All tests fixed, and so is the
abort in http://bitstream.ca/mt/images/banner_v3.gif
modified:
libcore/vm/ASHandlers.cpp
testsuite/actionscript.all/delete.as
------------------------------------------------------------
revno: 10229.1.10
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-11-06 20:32:45 +0100
message:
Don't build for earlier versions of ming.
modified:
testsuite/actionscript.all/delete.as
=== modified file 'libcore/Makefile.am'
--- a/libcore/Makefile.am 2008-11-05 10:02:06 +0000
+++ b/libcore/Makefile.am 2008-11-06 11:56:50 +0000
@@ -84,6 +84,7 @@
swf/TagLoadersTable.cpp \
swf/tag_loaders.cpp \
swf/DefineFontAlignZonesTag.cpp \
+ swf/DefineEditTextTag.cpp \
swf/CSMTextSettingsTag.cpp \
swf/PlaceObject2Tag.cpp \
swf/RemoveObjectTag.cpp \
@@ -177,6 +178,7 @@
swf/ControlTag.h \
swf/DefineFontAlignZonesTag.h \
swf/CSMTextSettingsTag.h \
+ swf/DefineEditTextTag.h \
swf/DefineButtonCxformTag.h \
swf/PlaceObject2Tag.h \
swf/RemoveObjectTag.h \
=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp 2008-11-05 10:02:06 +0000
+++ b/libcore/MovieClip.cpp 2008-11-06 13:56:00 +0000
@@ -28,7 +28,6 @@
#include "as_value.h"
#include "as_function.h"
#include "TextField.h" // for registered variables
-#include "edit_text_character_def.h" // @@ temp hack for createTextField exp.
#include "ControlTag.h"
#include "fn_call.h"
#include "Key_as.h"
@@ -3014,19 +3013,11 @@
{
// Create a definition (TODO: cleanup this thing, definitions should be
immutable!)
- boost::intrusive_ptr<edit_text_character_def> txt =
- new edit_text_character_def();
-
// Set textfield bounds
- txt->set_bounds(rect(0, 0, PIXELS_TO_TWIPS(width),
PIXELS_TO_TWIPS(height)));
-
- // Set font height (shouldn't be dependent on font ?)
- // TODO: 10 pixels is an arbitrary number here...
- txt->set_font_height(10*20);
-
+ rect bounds(0, 0, PIXELS_TO_TWIPS(width), PIXELS_TO_TWIPS(height));
// Create an instance
- boost::intrusive_ptr<character> txt_char =
txt->create_character_instance(this, 0);
+ boost::intrusive_ptr<character> txt_char = new TextField(this, bounds);
// Give name and mark as dynamic
txt_char->set_name(name);
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp 2008-11-05 12:23:13 +0000
+++ b/libcore/TextField.cpp 2008-11-06 15:59:49 +0000
@@ -23,6 +23,7 @@
#include "utf8.h"
#include "log.h"
+#include "swf/DefineEditTextTag.h"
#include "render.h" // for display()
#include "movie_definition.h" // to extract version info
#include "MovieClip.h"
@@ -72,8 +73,7 @@
namespace gnash {
// Forward declarations
-static as_value textfield_get_variable(const fn_call& fn);
-static as_value textfield_set_variable(const fn_call& fn);
+static as_value textfield_variable(const fn_call& fn);
static as_value textfield_setTextFormat(const fn_call& fn);
static as_value textfield_getTextFormat(const fn_call& fn);
static as_value textfield_setNewTextFormat(const fn_call& fn);
@@ -87,20 +87,21 @@
static as_object* getTextFieldInterface(VM& vm);
-static as_value textfield_background_getset(const fn_call& fn);
-static as_value textfield_border_getset(const fn_call& fn);
-static as_value textfield_backgroundColor_getset(const fn_call& fn);
-static as_value textfield_borderColor_getset(const fn_call& fn);
-static as_value textfield_textColor_getset(const fn_call& fn);
-static as_value textfield_embedFonts_getset(const fn_call& fn);
-static as_value textfield_autoSize_getset(const fn_call& fn);
-static as_value textfield_type_getset(const fn_call& fn);
-static as_value textfield_wordWrap_getset(const fn_call& fn);
-static as_value textfield_html_getset(const fn_call& fn);
-static as_value textfield_selectable_getset(const fn_call& fn);
-static as_value textfield_length_getset(const fn_call& fn);
-static as_value textfield_textWidth_getset(const fn_call& fn);
-static as_value textfield_textHeight_getset(const fn_call& fn);
+static as_value textfield_background(const fn_call& fn);
+static as_value textfield_border(const fn_call& fn);
+static as_value textfield_backgroundColor(const fn_call& fn);
+static as_value textfield_borderColor(const fn_call& fn);
+static as_value textfield_text(const fn_call& fn);
+static as_value textfield_textColor(const fn_call& fn);
+static as_value textfield_embedFonts(const fn_call& fn);
+static as_value textfield_autoSize(const fn_call& fn);
+static as_value textfield_type(const fn_call& fn);
+static as_value textfield_wordWrap(const fn_call& fn);
+static as_value textfield_html(const fn_call& fn);
+static as_value textfield_selectable(const fn_call& fn);
+static as_value textfield_length(const fn_call& fn);
+static as_value textfield_textWidth(const fn_call& fn);
+static as_value textfield_textHeight(const fn_call& fn);
//
@@ -108,27 +109,35 @@
//
static as_value
-textfield_get_variable(const fn_call& fn)
-{
- boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
-
- return as_value(text->get_variable_name());
-
-}
-
-static as_value
-textfield_set_variable(const fn_call& fn)
-{
- boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
-
- assert ( fn.nargs > 0 );
- const std::string& newname = fn.arg(0).to_string();
-
- text->set_variable_name(newname);
+textfield_variable(const fn_call& fn)
+{
+ boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
+
+ if (!fn.nargs)
+ {
+ // Getter
+ const std::string& varName = text->getVariableName();
+ // An empty variable name returns null.
+ if (varName.empty()) {
+ as_value null;
+ null.set_null();
+ return null;
+ }
+ return as_value(varName);
+ }
+
+ // Setter
+ const as_value& varName = fn.arg(0);
+ if (varName.is_undefined() || varName.is_null()) {
+ text->set_variable_name("");
+ }
+ else text->set_variable_name(varName.to_string());
return as_value();
+
}
+
static as_value
textfield_getDepth(const fn_call& fn)
{
@@ -356,6 +365,11 @@
return as_value();
}
+/// TextField.maxChars().
+//
+/// This does not limit the length of the text, but rather the
+/// number of characters that can be entered in the TextField.
+//
/// Returns null when the value is 0.
static as_value
textfield_maxChars(const fn_call& fn)
@@ -381,12 +395,39 @@
}
static as_value
+textfield_text(const fn_call& fn)
+{
+ boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
+ if (!fn.nargs)
+ {
+ // Getter
+ //
+ // FIXME: should return text without HTML tags.
+ return as_value(ptr->get_text_value());
+ }
+
+ // Setter
+ int version = ptr->getVM().getSWFVersion();
+ ptr->setTextValue(
+ utf8::decodeCanonicalString(fn.arg(0).to_string(), version));
+
+ return as_value();
+}
+
+static as_value
textfield_htmlText(const fn_call& fn)
{
- boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
- UNUSED(text);
+ boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
+ if (!fn.nargs)
+ {
+ // Getter
+ return as_value(ptr->get_text_value());
+ }
- LOG_ONCE (log_unimpl("TextField.htmlText"));
+ // Setter
+ int version = ptr->getVM().getSWFVersion();
+ ptr->setTextValue(
+ utf8::decodeCanonicalString(fn.arg(0).to_string(), version));
return as_value();
}
@@ -560,38 +601,37 @@
// The following properties should only be attached to the prototype
// on first textfield creation.
o.init_property(NSV::PROP_TEXT_WIDTH,
- textfield_textWidth_getset, textfield_textWidth_getset);
+ textfield_textWidth, textfield_textWidth);
o.init_property(NSV::PROP_TEXT_HEIGHT,
- textfield_textHeight_getset, textfield_textHeight_getset);
+ textfield_textHeight, textfield_textHeight);
- boost::intrusive_ptr<builtin_function> variable_getter(
- new builtin_function(&textfield_get_variable, NULL));
- boost::intrusive_ptr<builtin_function> variable_setter(
- new builtin_function(&textfield_set_variable, NULL));
- o.init_property("variable", *variable_getter, *variable_setter, swf6Flags);
- getset = new builtin_function(textfield_background_getset);
+ getset = new builtin_function(textfield_variable);
+ o.init_property("variable", *getset, *getset, swf6Flags);
+ getset = new builtin_function(textfield_background);
o.init_property("background", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_backgroundColor_getset);
+ getset = new builtin_function(textfield_text);
+ o.init_property("text", *getset, *getset, swf6Flags);
+ getset = new builtin_function(textfield_backgroundColor);
o.init_property("backgroundColor", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_border_getset);
+ getset = new builtin_function(textfield_border);
o.init_property("border", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_borderColor_getset);
+ getset = new builtin_function(textfield_borderColor);
o.init_property("borderColor", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_textColor_getset);
+ getset = new builtin_function(textfield_textColor);
o.init_property("textColor", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_embedFonts_getset);
+ getset = new builtin_function(textfield_embedFonts);
o.init_property("embedFonts", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_autoSize_getset);
+ getset = new builtin_function(textfield_autoSize);
o.init_property("autoSize", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_type_getset);
+ getset = new builtin_function(textfield_type);
o.init_property("type", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_wordWrap_getset);
+ getset = new builtin_function(textfield_wordWrap);
o.init_property("wordWrap", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_html_getset);
+ getset = new builtin_function(textfield_html);
o.init_property("html", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_selectable_getset);
+ getset = new builtin_function(textfield_selectable);
o.init_property("selectable", *getset, *getset, swf6Flags);
- getset = new builtin_function(textfield_length_getset);
+ getset = new builtin_function(textfield_length);
o.init_property("length", *getset, *getset, swf6Flags);
getset = new builtin_function(textfield_maxscroll);
o.init_property("maxscroll", *getset, *getset, swf6Flags);
@@ -662,46 +702,111 @@
// TextField class
//
-TextField::TextField(character* parent,
- edit_text_character_def* def, int id)
+TextField::TextField(character* parent, const SWF::DefineEditTextTag& def,
+ int id)
:
character(parent, id),
+ _tag(&def),
_text(L""),
- _textDefined(def->has_text()),
- m_def(def),
+ _textDefined(def.hasText()),
_underlined(false),
- _leading(m_def->get_leading()),
- _alignment(def->get_alignment()),
- _indent(def->get_indent()),
+ _leading(def.leading()),
+ _alignment(def.alignment()),
+ _indent(def.indent()),
_blockIndent(0),
- _leftMargin(def->get_left_margin()),
- _rightMargin(def->get_right_margin()),
- _fontHeight(def->get_font_height()),
+ _leftMargin(def.leftMargin()),
+ _rightMargin(def.rightMargin()),
+ _fontHeight(def.textHeight()),
_font(0),
m_has_focus(false),
m_cursor(0u),
m_xcursor(0.0f),
m_ycursor(0.0f),
- _multiline(def->multiline()),
- _password(def->password()),
- _maxChars(def->maxChars()),
+ _multiline(def.multiline()),
+ _password(def.password()),
+ _maxChars(def.maxChars()),
_text_variable_registered(false),
- _variable_name(m_def->get_variable_name()),
- _drawBackground(m_def->has_border()),
+ _variable_name(def.variableName()),
+ _drawBackground(def.border()),
_backgroundColor(255,255,255,255),
- _drawBorder(m_def->has_border()),
+ _drawBorder(def.border()),
_borderColor(0,0,0,255),
- _textColor(m_def->get_text_color()),
- _embedFonts(m_def->getUseEmbeddedGlyphs()),
- _wordWrap(m_def->do_word_wrap()),
- _html(m_def->htmlAllowed()),
- _selectable(!m_def->get_no_select()),
- _autoSize(autoSizeNone),
- _type(m_def->get_readonly() ? typeDynamic : typeInput),
- _bounds(m_def->get_bounds())
-{
- assert(parent);
- assert(m_def);
+ _textColor(def.color()),
+ _embedFonts(def.getUseEmbeddedGlyphs()),
+ _wordWrap(def.wordWrap()),
+ _html(def.html()),
+ _selectable(!def.noSelect()),
+ _autoSize(autoSizeNone),
+ _type(def.readOnly() ? typeDynamic : typeInput),
+ _bounds(def.get_bound())
+{
+
+ // WARNING! remember to set the font *before* setting text value!
+ boost::intrusive_ptr<const font> f = def.getFont();
+ if (!f) f = fontlib::get_default_font();
+ setFont(f);
+
+ int version = parent->getVM().getSWFVersion();
+
+ // set default text *before* calling registerTextVariable
+ // (if the textvariable already exist and has a value
+ // the text will be replaced with it)
+ if (_textDefined)
+ {
+ setTextValue(utf8::decodeCanonicalString(def.defaultText(), version));
+ }
+
+ init();
+
+}
+
+TextField::TextField(character* parent, const rect& bounds)
+ :
+ character(parent, 0),
+ _text(L""),
+ _textDefined(false),
+ _underlined(false),
+ _leading(0),
+ _alignment(ALIGN_LEFT),
+ _indent(0),
+ _blockIndent(0),
+ _leftMargin(0),
+ _rightMargin(0),
+ _fontHeight(12 * 20),
+ _font(0),
+ m_has_focus(false),
+ m_cursor(0u),
+ m_xcursor(0.0f),
+ m_ycursor(0.0f),
+ _multiline(false),
+ _password(false),
+ _maxChars(0),
+ _text_variable_registered(false),
+ _variable_name(), //?
+ _drawBackground(false),
+ _backgroundColor(255,255,255,255),
+ _drawBorder(false),
+ _borderColor(0, 0, 0, 255),
+ _textColor(0, 0, 0, 255),
+ _embedFonts(false), // ?
+ _wordWrap(false),
+ _html(false),
+ _selectable(true),
+ _autoSize(autoSizeNone),
+ _type(typeDynamic),
+ _bounds(bounds)
+{
+ // Use the default font (Times New Roman for Windows, Times for Mac
+ // according to docs. They don't say what it is for Linux.
+ boost::intrusive_ptr<const font> f = fontlib::get_default_font();
+ setFont(f);
+
+ init();
+}
+
+void
+TextField::init()
+{
as_object* proto = getTextFieldInterface(_vm);
@@ -716,30 +821,15 @@
Array_as* ar = new Array_as();
ar->push(this);
set_member(NSV::PROP_uLISTENERS, ar);
-
- // WARNING! remember to set the font *before* setting text value!
- setFont( m_def->get_font() );
-
- // set default text *before* calling registerTextVariable
- // (if the textvariable already exist and has a value
- // the text will be replaced with it)
-
- int version = parent->getVM().getSWFVersion();
- if (_textDefined)
- {
- setTextValue(utf8::decodeCanonicalString(
- m_def->get_default_text(), version));
- }
-
registerTextVariable();
m_dummy_style.push_back(fill_style());
reset_bounding_box(0, 0);
-
}
+
TextField::~TextField()
{
}
@@ -1015,16 +1105,11 @@
{
_textDefined = true;
- unsigned int maxLen = m_def->get_max_length();
-
- std::wstring newText = wstr; // copy needed for eventual resize
- if (maxLen && newText.length() > maxLen) newText.resize(maxLen);
-
- if (_text == newText) return;
+ if (_text == wstr) return;
set_invalidated();
- _text = newText;
+ _text = wstr;
format_text();
}
@@ -1086,21 +1171,6 @@
{
default:
break;
- case NSV::PROP_TEXT:
- {
- int version = get_parent()->get_movie_definition()->get_version();
- setTextValue(utf8::decodeCanonicalString(
- val.to_string_versioned(version), version));
- return true;
- }
- case NSV::PROP_HTML_TEXT:
- {
- int version = get_parent()->get_movie_definition()->get_version();
- setTextValue(utf8::decodeCanonicalString(
- val.to_string_versioned(version), version));
- format_text();
- return true;
- }
case NSV::PROP_uX:
{
SWFMatrix m = getMatrix();
@@ -1273,16 +1343,6 @@
{
default:
break;
- case NSV::PROP_TEXT:
- {
- val->set_string(get_text_value());
- return true;
- }
- case NSV::PROP_HTML_TEXT:
- {
- val->set_string(get_text_value());
- return true;
- }
case NSV::PROP_uVISIBLE:
{
val->set_bool(get_visible());
@@ -1331,17 +1391,14 @@
float
-TextField::align_line(
- edit_text_character_def::alignment align,
+TextField::align_line(TextAlignment align,
int last_line_start_record, float x)
{
- //GNASH_REPORT_FUNCTION;
- assert(m_def);
- float width = _bounds.width(); // m_def->width()
+ float width = _bounds.width();
float right_margin = getRightMargin();
- float extra_space = (width - right_margin) - x - PADDING_TWIPS;
+ float extra_space = (width - right_margin) - x - PADDING_TWIPS;
//assert(extra_space >= 0.0f);
if (extra_space <= 0.0f)
@@ -1354,19 +1411,19 @@
return 0.0f;
}
- float shift_right = 0.0f;
+ float shift_right = 0.0f;
- if (align == edit_text_character_def::ALIGN_LEFT)
+ if (align == ALIGN_LEFT)
{
// Nothing to do; already aligned left.
return 0.0f;
}
- else if (align == edit_text_character_def::ALIGN_CENTER)
+ else if (align == ALIGN_CENTER)
{
// Distribute the space evenly on both sides.
shift_right = extra_space / 2;
}
- else if (align == edit_text_character_def::ALIGN_RIGHT)
+ else if (align == ALIGN_RIGHT)
{
// Shift all the way to the right.
shift_right = extra_space;
@@ -1412,7 +1469,7 @@
}
// See bug #24266
- const rect& defBounds = _bounds; // m_def->get_bounds();
+ const rect& defBounds = _bounds;
AutoSizeValue autoSize = getAutoSize();
if ( autoSize != autoSizeNone )
@@ -1429,7 +1486,7 @@
}
// Should get info from autoSize too maybe ?
- edit_text_character_def::alignment textAlignment = getTextAlignment();
+ TextAlignment textAlignment = getTextAlignment();
// FIXME: I don't think we should query the definition
// to find the appropriate font to use, as ActionScript
@@ -1626,7 +1683,8 @@
// would ever happen, but UTF-8 conversion code can deal with codes
// up to 2^32; if they are valid, the code table will have to be
// enlarged.
- int index = _font->get_glyph_index(static_cast<boost::uint16_t>(code),
_embedFonts);
+ int index = _font->get_glyph_index(
+ static_cast<boost::uint16_t>(code), _embedFonts);
IF_VERBOSE_MALFORMED_SWF (
if (index == -1)
@@ -1828,12 +1886,8 @@
VariableRef ret;
ret.first = 0;
- std::string var_str = PROPNAME(variableName);
-
- const char* varname = var_str.c_str();
-
#ifdef DEBUG_DYNTEXT_VARIABLES
- log_debug(_("VariableName: %s"), var_str);
+ log_debug(_("VariableName: %s"), variableName);
#endif
/// Why isn't get_environment const again ?
@@ -1846,16 +1900,17 @@
log_swferror(_("Current environment has no target, "
"can't bind VariableName (%s) associated to "
"text field. Gnash will try to register "
- "again on next access."), var_str);
+ "again on next access."), variableName);
);
return ret;
}
// If the variable string contains a path, we extract
// the appropriate target from it and update the variable
- // name
+ // name. We copy the string so we can assign to it if necessary.
+ std::string parsedName = variableName;
std::string path, var;
- if ( as_environment::parse_path(varname, path, var) )
+ if (as_environment::parse_path(variableName, path, var))
{
#ifdef DEBUG_DYNTEXT_VARIABLES
log_debug(_("Variable text Path: %s, Var: %s"), path, var);
@@ -1864,20 +1919,23 @@
// we use our parent's environment for this
target = env.find_object(path);
- // update varname (with path component stripped)
- varname = var.c_str();
+ parsedName = var;
}
if ( ! target )
{
IF_VERBOSE_MALFORMED_SWF(
- log_swferror(_("VariableName associated to text field refer to an
unknown target (%s). It is possible that the character will be instantiated
later in the SWF stream. Gnash will try to register again on next access."),
path);
+ log_swferror(_("VariableName associated to text field refers "
+ "to an unknown target (%s). It is possible that the "
+ "character will be instantiated later in the SWF "
+ "stream. Gnash will try to register again on next "
+ "access."), path);
);
return ret;
}
ret.first = target;
- ret.second = _vm.getStringTable().find(varname);
+ ret.second = _vm.getStringTable().find(parsedName);
return ret;
}
@@ -1912,9 +1970,11 @@
as_object* target = varRef.first;
if ( ! target )
{
- log_debug(_("VariableName associated to text field (%s) refer to an
unknown target. "
- "It is possible that the character will be instantiated later
in the SWF stream. "
- "Gnash will try to register again on next access."),
_variable_name);
+ log_debug(_("VariableName associated to text field (%s) refer to "
+ "an unknown target. It is possible that the character "
+ "will be instantiated later in the SWF stream. "
+ "Gnash will try to register again on next access."),
+ _variable_name);
return;
}
@@ -1940,17 +2000,20 @@
{
as_value newVal = as_value(utf8::encodeCanonicalString(_text,
version));
#ifdef DEBUG_DYNTEXT_VARIABLES
- log_debug(_("target sprite (%s @ %p) does NOT have a member named %s
(no problem, we'll add it with value %s)"),
- typeName(*target), (void*)target, _vm.getStringTable().value(key),
- newVal);
+ log_debug(_("target sprite (%s @ %p) does NOT have a member "
+ "named %s (no problem, we'll add it with value %s)"),
+ typeName(*target), (void*)target,
+ _vm.getStringTable().value(key), newVal);
#endif
target->set_member(key, newVal);
}
else
{
#ifdef DEBUG_DYNTEXT_VARIABLES
- log_debug(_("target sprite (%s @ %p) does NOT have a member named %s,
and we don't have text defined"),
- typeName(*target), (void*)target, _vm.getStringTable().value(key));
+ log_debug(_("target sprite (%s @ %p) does NOT have a member "
+ "named %s, and we don't have text defined"),
+ typeName(*target), (void*)target,
+ _vm.getStringTable().value(key));
#endif
}
@@ -1961,7 +2024,8 @@
// add the textfield variable to the target sprite
// TODO: have set_textfield_variable take a string_table::key instead ?
#ifdef DEBUG_DYNTEXT_VARIABLES
- log_debug("Calling set_textfield_variable(%s) against sprite %s",
_vm.getStringTable().value(key), sprite->getTarget());
+ log_debug("Calling set_textfield_variable(%s) against sprite %s",
+ _vm.getStringTable().value(key), sprite->getTarget());
#endif
sprite->set_textfield_variable(_vm.getStringTable().value(key), this);
@@ -2009,16 +2073,25 @@
if ( newname != _variable_name )
{
_variable_name = newname;
+
+ // The name was empty or undefined, so there's nothing more to do.
+ if (_variable_name.empty()) return;
+
_text_variable_registered = false;
+
#ifdef DEBUG_DYNTEXT_VARIABLES
log_debug("Calling updateText after change of variable name");
#endif
- updateText(m_def->get_default_text());
+
+ // Use the original definition text if this isn't dynamically
+ // created.
+ if (_tag) updateText(_tag->defaultText());
+
#ifdef DEBUG_DYNTEXT_VARIABLES
- log_debug("Calling registerTextVariable after change of variable name
and updateText call");
+ log_debug("Calling registerTextVariable after change of variable "
+ "name and updateText call");
#endif
registerTextVariable();
- //reset_bounding_box(0, 0); // does this make sense ? it's called in
the constructor...
}
}
@@ -2217,7 +2290,7 @@
}
void
-TextField::setAlignment(edit_text_character_def::alignment h)
+TextField::setAlignment(TextAlignment h)
{
if ( _alignment != h )
{
@@ -2283,7 +2356,7 @@
}
static as_value
-textfield_background_getset(const fn_call& fn)
+textfield_background(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2300,7 +2373,7 @@
}
static as_value
-textfield_border_getset(const fn_call& fn)
+textfield_border(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2317,7 +2390,7 @@
}
static as_value
-textfield_backgroundColor_getset(const fn_call& fn)
+textfield_backgroundColor(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2336,7 +2409,7 @@
}
static as_value
-textfield_borderColor_getset(const fn_call& fn)
+textfield_borderColor(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2354,44 +2427,44 @@
return as_value();
}
+
static as_value
-textfield_textColor_getset(const fn_call& fn)
+textfield_textColor(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
+ if (!fn.nargs)
{
+ // Getter
return as_value(ptr->getTextColor().toRGB());
}
- else // setter
- {
- rgba newColor;
- newColor.parseRGB( static_cast<boost::uint32_t>(fn.arg(0).to_number())
);
- ptr->setTextColor(newColor);
- }
+
+ // Setter
+ rgba newColor;
+ newColor.parseRGB(static_cast<boost::uint32_t>(fn.arg(0).to_number()));
+ ptr->setTextColor(newColor);
return as_value();
}
static as_value
-textfield_embedFonts_getset(const fn_call& fn)
+textfield_embedFonts(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
- if ( fn.nargs == 0 ) // getter
+ if (!fn.nargs)
{
+ // Getter
return as_value(ptr->getEmbedFonts());
}
- else // setter
- {
- ptr->setEmbedFonts( fn.arg(0).to_bool() );
- }
+ // Setter
+ ptr->setEmbedFonts( fn.arg(0).to_bool() );
return as_value();
}
static as_value
-textfield_wordWrap_getset(const fn_call& fn)
+textfield_wordWrap(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2408,7 +2481,7 @@
}
static as_value
-textfield_html_getset(const fn_call& fn)
+textfield_html(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2425,7 +2498,7 @@
}
static as_value
-textfield_selectable_getset(const fn_call& fn)
+textfield_selectable(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2442,7 +2515,7 @@
}
static as_value
-textfield_length_getset(const fn_call& fn)
+textfield_length(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2463,7 +2536,7 @@
}
static as_value
-textfield_textHeight_getset(const fn_call& fn)
+textfield_textHeight(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2489,7 +2562,7 @@
}
static as_value
-textfield_textWidth_getset(const fn_call& fn)
+textfield_textWidth(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2515,7 +2588,7 @@
}
static as_value
-textfield_autoSize_getset(const fn_call& fn)
+textfield_autoSize(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2550,7 +2623,7 @@
}
static as_value
-textfield_type_getset(const fn_call& fn)
+textfield_type(const fn_call& fn)
{
boost::intrusive_ptr<TextField> ptr = ensureType<TextField>(fn.this_ptr);
@@ -2664,16 +2737,13 @@
format_text();
}
-edit_text_character_def::alignment
+TextField::TextAlignment
TextField::getTextAlignment()
{
- // TODO: use a _textAlignment private member to reduce lookups ?
- // The member would be initialized to m_def->get_alignment and then update
- // when _autoSize is updated.
- edit_text_character_def::alignment textAlignment = getAlignment();
- if ( _autoSize == autoSizeCenter ) textAlignment =
edit_text_character_def::ALIGN_CENTER;
- else if ( _autoSize == autoSizeLeft ) textAlignment =
edit_text_character_def::ALIGN_LEFT;
- else if ( _autoSize == autoSizeRight ) textAlignment =
edit_text_character_def::ALIGN_RIGHT;
+ TextAlignment textAlignment = getAlignment();
+ if ( _autoSize == autoSizeCenter ) textAlignment = ALIGN_CENTER;
+ else if ( _autoSize == autoSizeLeft ) textAlignment = ALIGN_LEFT;
+ else if ( _autoSize == autoSizeRight ) textAlignment = ALIGN_RIGHT;
return textAlignment;
}
@@ -2736,9 +2806,10 @@
void
TextField::markReachableResources() const
{
- if ( m_def.get() ) m_def->setReachable();
-
- if ( _font ) _font->setReachable();
+
+ if (_tag) _tag->setReachable();
+
+ if (_font) _font->setReachable();
// recurse to parent...
markCharacterReachable();
=== modified file 'libcore/TextField.h'
--- a/libcore/TextField.h 2008-11-05 10:02:06 +0000
+++ b/libcore/TextField.h 2008-11-06 13:56:00 +0000
@@ -19,7 +19,6 @@
#define GNASH_TEXTFIELD_H
#include "character.h" // for inheritance
-#include "edit_text_character_def.h" // for inlines and typedefs
#include "styles.h" // for fill_style and line_style
#include "text.h" // for text_glyph_record
#include "Range2d.h"
@@ -28,19 +27,29 @@
// Forward declarations
namespace gnash {
- class text_character_def;
class text_glyph_record;
- //class MovieClip;
+ namespace SWF {
+ class DefineEditTextTag;
+ }
}
namespace gnash {
-/// An instance of an edit_text_character_def
+/// An instance of a DefineEditTextTag
class TextField : public character
{
public:
+ /// Text alignment values
+ enum TextAlignment
+ {
+ ALIGN_LEFT = 0,
+ ALIGN_RIGHT,
+ ALIGN_CENTER,
+ ALIGN_JUSTIFY
+ };
+
/// Possible autoSize values
enum AutoSizeValue {
@@ -71,10 +80,9 @@
typeInput
};
- TextField(
- character* parent,
- edit_text_character_def* def,
- int id);
+ TextField(character* parent, const SWF::DefineEditTextTag& def, int id);
+
+ TextField(character* parent, const rect& bounds);
~TextField();
@@ -82,7 +90,7 @@
bool can_handle_mouse_event() const { return true; }
character* get_topmost_mouse_entity(boost::int32_t x, boost::int32_t y);
-
+
bool wantsInstanceName() const
{
return true; // text fields can be referenced
@@ -90,9 +98,9 @@
bool on_event(const event_id& id);
- const char* get_variable_name() const
+ const std::string& getVariableName() const
{
- return _variable_name.c_str();
+ return _variable_name;
}
/// Set the name of a variable associated to this
@@ -233,8 +241,8 @@
return _autoSize;
}
- /// Return text alignment
- edit_text_character_def::alignment getTextAlignment();
+ /// Return text TextAlignment
+ TextAlignment getTextAlignment();
/// Set autoSize value
//
@@ -409,12 +417,12 @@
void setBlockIndent(boost::uint16_t h);
- edit_text_character_def::alignment getAlignment() const
+ TextAlignment getAlignment() const
{
return _alignment;
}
- void setAlignment(edit_text_character_def::alignment h);
+ void setAlignment(TextAlignment h);
boost::uint16_t getLeading() const
{
@@ -435,14 +443,22 @@
return m_text_bounding_box;
}
-private:
-
/// Set our text to the given string.
//
/// This function will also update any registered variable
///
void setTextValue(const std::wstring& wstr);
+
+private:
+
+ void init();
+
+ /// The immutable definition of our TextField
+ //
+ /// This is NULL for dynamic TextFields.
+ boost::intrusive_ptr<const SWF::DefineEditTextTag> _tag;
+
/// \brief Set our text to the given string by effect of an update of a
/// registered variable name
//
@@ -480,11 +496,6 @@
/// and no actionscript added text.
bool _textDefined;
- /// immutable definition of this object, as read
- /// from the SWF stream. Assured to be not-NULL
- /// by constructor. This might change in the future
- boost::intrusive_ptr<edit_text_character_def> m_def;
-
/// bounds of dynamic text, as laid out
rect m_text_bounding_box;
@@ -522,14 +533,13 @@
/// m_text_glyph_records[], starting with
/// last_line_start_record and going through the end of
/// m_text_glyph_records.
- float align_line(edit_text_character_def::alignment align,
- int last_line_start_record, float x);
+ float align_line(TextAlignment align, int last_line_start_record, float
x);
bool _underlined;
boost::uint16_t _leading;
- edit_text_character_def::alignment _alignment;
+ TextAlignment _alignment;
boost::uint16_t _indent;
=== modified file 'libcore/as_environment.cpp'
--- a/libcore/as_environment.cpp 2008-10-25 10:38:32 +0000
+++ b/libcore/as_environment.cpp 2008-11-06 19:04:35 +0000
@@ -31,7 +31,6 @@
#include "as_function.h"
#include "CallStack.h"
-#include <cstring> // std::strpbrk
#include <string>
#include <utility> // for std::pair
#include <boost/algorithm/string/case_conv.hpp>
@@ -227,15 +226,14 @@
}
bool
-as_environment::del_variable_raw(
- const std::string& varname,
- const ScopeStack& scopeStack)
+as_environment::delVariableRaw(const std::string& varname,
+ const ScopeStack& scopeStack)
+{
// varname must be a plain variable name; no path parsing.
-{
- assert( ! std::strpbrk(varname.c_str(), ":/.") );
+ assert(varname.find_first_of(":/.") == std::string::npos);
string_table::key varkey = _vm.getStringTable().find(varname);
- as_value val;
+ as_value val;
// Check the with-stack.
for (size_t i = scopeStack.size(); i > 0; --i)
=== modified file 'libcore/as_environment.h'
--- a/libcore/as_environment.h 2008-10-27 07:48:40 +0000
+++ b/libcore/as_environment.h 2008-11-06 19:04:35 +0000
@@ -176,7 +176,7 @@
/// a ScopeStack.
//
/// @param varname
- /// Variable name. Can not contain path elements.
+ /// Variable name. Must not contain path elements.
/// TODO: should be case-insensitive up to SWF6.
/// NOTE: no case conversion is performed currently,
/// so make sure you do it yourself. Note that
@@ -186,8 +186,8 @@
/// @param scopeStack
/// The Scope stack to use for lookups.
///
- bool del_variable_raw(const std::string& varname,
- const ScopeStack& scopeStack);
+ bool delVariableRaw(const std::string& varname,
+ const ScopeStack& scopeStack);
/// Return the (possibly UNDEFINED) value of the named var.
//
@@ -463,7 +463,8 @@
///
/// If no colon or dot, returns false and leaves *path & *var alone.
///
- /// TODO: return an integer: 0 not a path, 1 a slash-based path, 2 a
dot-based path
+ /// TODO: return an integer: 0 not a path, 1 a slash-based path, 2 a
+ /// dot-based path
///
static bool parse_path(const std::string& var_path, std::string& path,
std::string& var);
=== modified file 'libcore/asobj/TextFormat.cpp'
--- a/libcore/asobj/TextFormat.cpp 2008-10-20 17:06:14 +0000
+++ b/libcore/asobj/TextFormat.cpp 2008-11-06 11:56:50 +0000
@@ -86,7 +86,7 @@
_bold(false),
_italic(false),
_bullet(false),
- _align(edit_text_character_def::ALIGN_LEFT),
+ _align(TextField::ALIGN_LEFT),
_blockIndent(-1),
_color(),
_indent(-1),
@@ -507,33 +507,33 @@
}
-edit_text_character_def::alignment
+TextField::TextAlignment
TextFormat::parseAlignString(const std::string& align)
{
StringNoCaseEqual cmp;
- if ( cmp(align, "left") ) return edit_text_character_def::ALIGN_LEFT;
- else if ( cmp(align, "center") ) return
edit_text_character_def::ALIGN_CENTER;
- else if ( cmp(align, "right") ) return
edit_text_character_def::ALIGN_RIGHT;
- else if ( cmp(align, "justify") ) return
edit_text_character_def::ALIGN_JUSTIFY;
+ if ( cmp(align, "left") ) return TextField::ALIGN_LEFT;
+ else if ( cmp(align, "center") ) return TextField::ALIGN_CENTER;
+ else if ( cmp(align, "right") ) return TextField::ALIGN_RIGHT;
+ else if ( cmp(align, "justify") ) return TextField::ALIGN_JUSTIFY;
else
{
log_debug("Invalid align string %s, take as left", align);
- return edit_text_character_def::ALIGN_LEFT;
+ return TextField::ALIGN_LEFT;
}
}
const char*
-TextFormat::getAlignString(edit_text_character_def::alignment a)
+TextFormat::getAlignString(TextField::TextAlignment a)
{
switch (a)
{
- case edit_text_character_def::ALIGN_LEFT:
+ case TextField::ALIGN_LEFT:
return "left";
- case edit_text_character_def::ALIGN_CENTER:
+ case TextField::ALIGN_CENTER:
return "center";
- case edit_text_character_def::ALIGN_RIGHT:
+ case TextField::ALIGN_RIGHT:
return "right";
- case edit_text_character_def::ALIGN_JUSTIFY:
+ case TextField::ALIGN_JUSTIFY:
return "justify";
default:
log_error("Uknown alignment value: %d, take as left",
a);
=== modified file 'libcore/asobj/TextFormat.h'
--- a/libcore/asobj/TextFormat.h 2008-10-20 17:06:14 +0000
+++ b/libcore/asobj/TextFormat.h 2008-11-06 11:56:50 +0000
@@ -18,23 +18,18 @@
//
//
-#ifndef __TEXTFORMAT_H__
-#define __TEXTFORMAT_H__
+#ifndef GNASH_TEXTFORMAT_H
+#define GNASH_TEXTFORMAT_H
#include "as_object.h" // for inheritance of TextFormat
-#include "edit_text_character_def.h" // for edit_text_character_def::alignment
enum
+#include "TextField.h" // for TextAlignment enum
#include "RGBA.h" // for rgba
#include <boost/cstdint.hpp> // for boost::uint32_t
#include <string>
-// Forward declarations
-namespace gnash {
- //class as_object;
-}
-
-namespace gnash {
-
-class DSOEXPORT TextFormat : public as_object
+namespace gnash {
+
+class TextFormat : public as_object
{
public:
@@ -67,7 +62,7 @@
bool indentDefined() const { return _flags&DEFindent; }
/// Return the alignment of the paragraph.
- edit_text_character_def::alignment align() const { return _align; }
+ TextField::TextAlignment align() const { return _align; }
bool alignDefined() const { return _flags&DEFalign; }
/// Return the name of a font for text as a string.
@@ -116,12 +111,12 @@
void colorSet(const rgba& x) { _color = x; _flags |= DEFcolor; }
void indentSet(boost::uint16_t x) { _indent = x; _flags |=
DEFindent; }
void fontSet(const std::string& font) { _font=font; _flags |= DEFfont; }
- void alignSet(edit_text_character_def::alignment x) { _align = x;
_flags |= DEFalign; }
+ void alignSet(TextField::TextAlignment x) { _align = x; _flags |=
DEFalign; }
- static edit_text_character_def::alignment parseAlignString(const
std::string& align);
+ static TextField::TextAlignment parseAlignString(const std::string&
align);
/// Return the text representation of alignment value.
- static const char* getAlignString(edit_text_character_def::alignment a);
+ static const char* getAlignString(TextField::TextAlignment a);
void alignSet(const std::string& align) {
alignSet(parseAlignString(align)); }
@@ -195,7 +190,7 @@
/// paragraph is centered. If "right", the paragraph is
/// right-aligned. If "justify", the paragraph is justified.
///
- edit_text_character_def::alignment _align;
+ TextField::TextAlignment _align;
//
boost::uint16_t _blockIndent;
=== modified file 'libcore/impl.cpp'
--- a/libcore/impl.cpp 2008-10-29 07:44:11 +0000
+++ b/libcore/impl.cpp 2008-11-06 11:56:50 +0000
@@ -43,6 +43,7 @@
#include "RemoveObjectTag.h"
#include "DoActionTag.h"
#include "DoInitActionTag.h"
+#include "DefineEditTextTag.h"
#include "SetBackgroundColorTag.h"
#include "StartSoundTag.h"
#include "StreamSoundBlockTag.h"
@@ -131,7 +132,7 @@
register_tag_loader(SWF::DEFINEBUTTON2, button_character_loader);
register_tag_loader(SWF::DEFINEBITSJPEG3, define_bits_jpeg3_loader);
register_tag_loader(SWF::DEFINELOSSLESS2, define_bits_lossless_2_loader);
- register_tag_loader(SWF::DEFINEEDITTEXT, define_edit_text_loader);
+ register_tag_loader(SWF::DEFINEEDITTEXT, DefineEditTextTag::loader);
register_tag_loader(SWF::DEFINEVIDEO, fixme_loader); // 38
register_tag_loader(SWF::DEFINESPRITE, sprite_loader);
register_tag_loader(SWF::NAMECHARACTER, fixme_loader); // 40
=== modified file 'libcore/parser/Makefile.am'
--- a/libcore/parser/Makefile.am 2008-10-30 13:15:12 +0000
+++ b/libcore/parser/Makefile.am 2008-11-06 11:56:50 +0000
@@ -52,7 +52,6 @@
BitmapMovieDefinition.cpp \
button_character_def.cpp \
character_def.cpp \
- edit_text_character_def.cpp \
text_character_def.cpp \
SWFMovieDefinition.cpp \
morph2_character_def.cpp \
@@ -68,7 +67,6 @@
character_def.h \
bitmap_character_def.h \
BitmapMovieDefinition.h \
- edit_text_character_def.h \
text_character_def.h \
morph2_character_def.h \
movie_definition.h \
=== removed file 'libcore/parser/edit_text_character_def.cpp'
--- a/libcore/parser/edit_text_character_def.cpp 2008-11-05 10:02:06
+0000
+++ b/libcore/parser/edit_text_character_def.cpp 1970-01-01 00:00:00
+0000
@@ -1,226 +0,0 @@
-// edit_text_character_def.cpp: Text tags, for Gnash.
-//
-// Copyright (C) 2006, 2007, 2008 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
-//
-
-
-// Based on the public domain text.cpp of Thatcher Ulrich <address@hidden> 2003
-
-#include "smart_ptr.h" // GNASH_USE_GC
-#include "SWFStream.h"
-#include "log.h"
-#include "movie_definition.h" // for m_root_def use
-#include "edit_text_character_def.h"
-#include "TextField.h"
-#include "font.h" // for setReachable call, ctor and dtor
-#include "fontlib.h"
-
-namespace gnash {
-
-// Forward declarations
-class movie_definition;
-
-void
-edit_text_character_def::read(SWFStream& in, int tag_type,
- movie_definition& m)
-{
- //assert(m != NULL);
- assert(tag_type == SWF::DEFINEEDITTEXT); // 37
-
- m_rect.read(in);
-
- in.align();
- in.ensureBytes(2);
-
- int flags = in.read_u8();
- m_has_text = flags & (1 << 7);
- m_word_wrap = flags & (1 << 6);
- m_multiline = flags & (1 << 5);
- m_password = flags & (1 << 4);
- m_readonly = flags & (1 << 3);
- bool has_color = flags & (1 << 2);
- bool has_max_length = flags & (1 << 1);
- bool has_font = flags & (1 << 0);
-
- flags = in.read_u8();
- // 0: no font class, 1 font class and height, can't be true if has_font
was true
- bool hasFontClass = flags & (1 << 7);
- if ( hasFontClass && has_font )
- {
- IF_VERBOSE_MALFORMED_SWF(
- log_swferror("DefineEditText: hasFontClass can't be true if
hasFont is true, ignoring");
- );
- hasFontClass=false;
- }
- m_auto_size = flags & (1 << 6);
- bool has_layout = flags & (1 << 5);
- m_no_select = flags & (1 << 4);
- m_border = flags & (1 << 3);
- bool wasStatic = flags & (1 << 2); // authored as static text (not
dynamic text)
- UNUSED(wasStatic);
- m_html = flags & (1 << 1);
- m_use_outlines = flags & (1 << 0);
-
- if (has_font)
- {
- in.ensureBytes(4);
- m_font_id = in.read_u16();
- m_font = m.get_font(m_font_id);
- if (m_font == NULL)
- {
- IF_VERBOSE_MALFORMED_SWF(
- log_swferror("DefineEditText: tag refers to unknown
font id %d", m_font_id);
- );
- }
- m_text_height = in.read_u16();
- }
- else if ( hasFontClass )
- {
- std::string fontClassName;
- in.read_string(fontClassName);
- log_unimpl("Font class support for DefineEditText (%d)",
fontClassName);
- }
-
-
- if (has_color)
- {
- m_color.read_rgba(in);
- }
-
- if (has_max_length)
- {
- in.ensureBytes(2);
- m_max_length = in.read_u16();
- }
-
- if (has_layout)
- {
- in.ensureBytes(9); //1 + 2 + 2 + 2 + 2
- m_alignment = static_cast<alignment>(in.read_u8());
- m_left_margin = in.read_u16(); // used to be cast to float
- m_right_margin = in.read_u16(); // used to be cast to float
- m_indent = in.read_s16();
- m_leading = in.read_s16();
- }
-
- in.read_string(m_variable_name);
-
- if (m_has_text)
- {
- in.read_string(m_default_text);
- }
-
- IF_VERBOSE_PARSE (
- log_parse("edit_text_char:\n"
- " varname = %s\n"
- " text = ``%s''\n"
- " font_id: %d\n"
- " text_height: %d",
- m_variable_name, m_default_text, m_font_id,
m_text_height);
- );
-}
-
-const font*
-edit_text_character_def::get_font()
-{
- if ( ! m_font )
- {
- m_font = fontlib::get_default_font().get();
- }
- return m_font.get();
-}
-
-character*
-edit_text_character_def::create_character_instance(character* parent,
- int id)
-{
- // Resolve the font, if possible
- get_font();
- TextField* ch = new TextField(parent, this, id);
-
- // This gives an "instance name" to the TextField, but
- // it is not really what we need.
- //
- // First of all the VariableName ("m_variable_name") is
- // NOT the default name of an instance, rather it is
- // a variable associated with it and can contain path
- // information (ie. we can associate a variable in a different
- // timeline)
- //
- // We actually need to set that variable to an object which
- // is a TextField dinamic variable. The object should take
- // care of updating this TextField text when assigned to
- // and to retrive this TextField text when extracted value from.
- //
- // The DefineEditTextVariableNameTest.swf file under
- // testsuite/misc-ming.all gives an idea of the problem
- // (in particular it shows a case in which VariableName is
- // outside of TextField timeline/scope)
- //
- //ch->set_name(m_variable_name.c_str());
-
- return ch;
-}
-
-#ifdef GNASH_USE_GC
-void
-edit_text_character_def::markReachableResources() const
-{
- //if ( m_root_def ) m_root_def->setReachable();
- if ( m_font ) m_font->setReachable();
-}
-#endif // GNASH_USE_GC
-
-edit_text_character_def::edit_text_character_def()
- :
- m_has_text(true), // For an SWF-defined textfield we'll read
- // this from the tag. Dynamic textfields should
- // behave as always having text by default (not
tested).
-
- m_word_wrap(false),
- m_multiline(false),
- m_password(false),
- m_readonly(true),
- m_auto_size(false),
- m_no_select(false),
- m_border(false),
- m_html(false),
- m_use_outlines(false), // For an SWF-defined textfield we'll read
- // this from the tag. Dynamic textfields should
- // use device fonts by default (so not use
outline ones)
- m_font_id(-1),
- m_font(),
- m_text_height(1), // TODO: initialize to a meaningful value (see
MovieClip::add_textfield)
- // and make sure get_font_height is not called
for rendering purposes
- // (instead call a method of
edit_text_character_def)
- m_max_length(0),
- m_alignment(ALIGN_LEFT),
- m_left_margin(0),
- m_right_margin(0),
- m_indent(0),
- m_leading(0)
-{
- m_color.set(0, 0, 0, 255);
-}
-
-
-} // namespace gnash
-
-// Local Variables:
-// mode: C++
-// indent-tabs-mode: t
-// End:
=== removed file 'libcore/parser/edit_text_character_def.h'
--- a/libcore/parser/edit_text_character_def.h 2008-11-05 10:02:06 +0000
+++ b/libcore/parser/edit_text_character_def.h 1970-01-01 00:00:00 +0000
@@ -1,327 +0,0 @@
-//
-// Copyright (C) 2005, 2006, 2007, 2008 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
-
-#ifndef GNASH_EDIT_TEXT_CHARACTER_DEF_H
-#define GNASH_EDIT_TEXT_CHARACTER_DEF_H
-
-#include "smart_ptr.h" // GNASH_USE_GC
-#include "RGBA.h" // for rgba type
-#include "character_def.h" // for inheritance
-#include "rect.h" // for composition
-
-namespace gnash {
-
-// Forward declarations
-class movie_definition;
-class SWFStream; // for read signature
-class font;
-
-/// \brief
-/// A definition for a text display character, whose text can
-/// be changed at runtime (by script or host).
-/// This object is defined by SWF tag 37 (SWF::DEFINEEDITTEXT)
-///
-class edit_text_character_def : public character_def
-{
-public:
-
- /// Text alignment values
- enum alignment
- {
- ALIGN_LEFT = 0,
- ALIGN_RIGHT,
- ALIGN_CENTER,
- ALIGN_JUSTIFY
- };
-
- edit_text_character_def();
-
- /// Get width of this definition in twips (by definition)
- float width() const { return m_rect.width(); }
-
- /// Get height of this definition in twips (by definition)
- float height() const { return m_rect.height(); }
-
- /// Create an instance of this character
- character* create_character_instance(character* parent, int id);
-
- /// Initialize from SWF input stream (tag 37)
- void read(SWFStream& in, int tag_type, movie_definition& m);
-
- /// Return a reference to the default text associated
- /// with this EditText definition.
- const std::string& get_default_text() const {
- return m_default_text;
- }
-
- /// Return a reference to the "VariableName" associated
- /// with this EditText definition. The variable name
- /// is allowed to contain path information and should
- /// be used to provide an 'alias' to the 'text' member
- /// of instances.
- const std::string& get_variable_name() const {
- return m_variable_name;
- }
-
- /// Return the maximum length of text this widget can hold.
- //
- /// If zero, the text length is unlimited.
- ///
- unsigned int get_max_length() const {
- return m_max_length;
- }
-
- /// Get boundaries of this movie
- //
- /// Return a reference to private space, copy
- /// it if you need it for longer then this
- /// object's lifetime.
- ///
- const rect& get_bounds() const {
- return m_rect;
- }
-
- /// Set boundaries of this textfield
- //
- /// This method is used for dynamic textfields
- /// (actionscript created)
- ///
- void set_bounds(const rect& bounds)
- {
- m_rect = bounds;
- }
-
- /// Get right margin in twips
- boost::uint16_t get_right_margin() const {
- return m_right_margin;
- }
-
- /// Get left margin in twips
- boost::uint16_t get_left_margin() const {
- return m_left_margin;
- }
-
- /// Get indentation in twips
- boost::uint16_t get_indent() const {
- return m_indent;
- }
-
- /// Get height of font in twips.
- // @@ what if has_font is false ??
- boost::uint16_t get_font_height() const {
- return m_text_height;
- }
-
- /// Set height of font in twips.
- //
- /// Used by dynamically created textfields.
- ///
- void set_font_height(boost::uint16_t h) {
- m_text_height = h;
- }
-
- /// Get font.
- //
- /// Note: use add_ref() on the return if you need to keep
- /// it alive after this definition gets destructed.
- ///
- const font* get_font();
-
- /// Get color of the text
- const rgba& get_text_color() const {
- return m_color;
- }
-
- /// Set color of the text
- void set_text_color(const rgba& col) {
- m_color = col;
- }
-
- /// \brief
- /// Get extra space between lines (in twips).
- //
- /// This is in addition to default font line spacing.
- boost::uint16_t get_leading() const {
- return m_leading;
- }
-
- bool multiline() const {
- return m_multiline;
- }
-
- bool password() const {
- return m_password;
- }
-
- boost::int32_t maxChars() const {
- return m_max_length;
- }
-
- /// Get text alignment
- alignment get_alignment() const {
- return m_alignment;
- }
-
- /// Is border requested ?
- bool has_border() const {
- return m_border;
- }
-
- /// Word wrap requested ?
- bool do_word_wrap() const {
- return m_word_wrap;
- }
-
- /// Has text defined ?
- bool has_text() const {
- return m_has_text;
- }
-
- bool get_readonly() const
- {
- return m_readonly;
- }
-
- bool get_no_select() const
- {
- return m_no_select;
- }
-
- const rect& get_bound() const
- {
- // I know it's stupid to have an alias that's nearly the same
name but
- // get_bound() is required by the base class and get_bounds()
was already
- // there. Should be fixed (remove get_bounds).
- return get_bounds();
- }
-
- /// Return true if HTML was allowed by definition
- bool htmlAllowed() const { return m_html; }
-
- /// Return true if this character definition requested use of device
fonts
- //
- /// Used by edit_text_character constructor to set it's default.
- ///
- bool getUseEmbeddedGlyphs() const
- {
- return m_use_outlines;
- }
-
-protected:
-
-#ifdef GNASH_USE_GC
- /// Mark all reachable resources (for GC)
- //
- /// Reachable resources are:
- /// - The font being used (m_font)
- ///
- void markReachableResources() const;
-#endif // GNASH_USE_GC
-
-private:
-
- rect m_rect;
- std::string m_variable_name;
- bool m_has_text;
- bool m_word_wrap;
- bool m_multiline;
- /// show asterisks instead of actual characters
- bool m_password;
- bool m_readonly;
- /// resize our bound to fit the text
- bool m_auto_size;
- bool m_no_select;
-
- /// forces white background and black border.
- /// silly, but sometimes used
- bool m_border;
-
- /// Allowed HTML (from Alexi's SWF Reference).
- //
- /// <a href=url target=targ>...</a> -- hyperlink
- /// <b>...</b> -- bold
- /// <br> -- line break
- /// <font face=name size=[+|-][0-9]+ color=#RRGGBB>...</font> -- font
change; size in TWIPS
- /// <i>...</i> -- italic
- /// <li>...</li> -- list item
- /// <p>...</p> -- paragraph
- /// <tab> -- insert tab
- /// <TEXTFORMAT> </TEXTFORMAT>
- /// [ BLOCKINDENT=[0-9]+ ]
- /// [ INDENT=[0-9]+ ]
- /// [ LEADING=[0-9]+ ]
- /// [ LEFTMARGIN=[0-9]+ ]
- /// [ RIGHTMARGIN=[0-9]+ ]
- /// [ TABSTOPS=[0-9]+{,[0-9]+} ]
- ///
- /// Change the different parameters as indicated. The
- /// sizes are all in TWIPs. There can be multiple
- /// positions for the tab stops. These are seperated by
- /// commas.
- /// <U>...</U> -- underline
- ///
- bool m_html;
-
-
-
- /// \brief
- /// When true, use specified SWF internal font (embed fonts)
- /// Otherwise, use specified device font (or a default one if m_font_id
is -1)
- ///
- /// Also known as USE_GLYPH (from Ming)
- ///
- bool m_use_outlines;
-
- int m_font_id;
- boost::intrusive_ptr<font> m_font;
-
- /// height of font text, in twips
- boost::uint16_t m_text_height;
-
- /// Text color
- rgba m_color;
-
- /// Maximum length of text this widget can display (number of chars?)
- //
- /// If zero, the text length is unlimited.
- ///
- unsigned int m_max_length;
-
- alignment m_alignment;
-
- /// extra space between box's left border and text (in twips)
- boost::uint16_t m_left_margin;
-
- /// extra space between box's right border and text (in twips)
- boost::uint16_t m_right_margin;
-
- /// how much to indent the first line of multiline text (in twips)
- boost::uint16_t m_indent;
-
- /// \brief
- /// Extra space between lines
- /// (in addition to default font line spacing)
- boost::uint16_t m_leading;
-
- /// The default text to be displayed
- std::string m_default_text;
-
-};
-
-} // namespace gnash
-
-#endif // _GNASH_EDIT_TEXT_CHARACTER_DEF_H_
=== added file 'libcore/swf/DefineEditTextTag.cpp'
--- a/libcore/swf/DefineEditTextTag.cpp 1970-01-01 00:00:00 +0000
+++ b/libcore/swf/DefineEditTextTag.cpp 2008-11-06 13:56:00 +0000
@@ -0,0 +1,207 @@
+//
+// Copyright (C) 2007, 2008 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 "DefineEditTextTag.h"
+#include "TextField.h"
+#include "movie_definition.h"
+#include "font.h"
+#include "SWFStream.h"
+
+namespace gnash {
+namespace SWF {
+
+void
+DefineEditTextTag::loader(SWFStream& in, tag_type tag, movie_definition& m,
+ const RunInfo& /*r*/)
+{
+ assert(tag == SWF::DEFINEEDITTEXT); // 37
+
+ in.ensureBytes(2);
+ boost::uint16_t characterID = in.read_u16();
+
+ std::auto_ptr<DefineEditTextTag> editText(new DefineEditTextTag(in, m));
+
+ m.add_character(characterID, editText.release());
+}
+
+character*
+DefineEditTextTag::create_character_instance(character* parent, int id)
+{
+ // Resolve the font, if possible
+ getFont();
+ TextField* ch = new TextField(parent, *this, id);
+
+ // This gives an "instance name" to the TextField, but
+ // it is not really what we need.
+ //
+ // First of all the VariableName ("_variableName") is
+ // NOT the default name of an instance, rather it is
+ // a variable associated with it and can contain path
+ // information (ie. we can associate a variable in a different
+ // timeline)
+ //
+ // We actually need to set that variable to an object which
+ // is a TextField dinamic variable. The object should take
+ // care of updating this TextField text when assigned to
+ // and to retrive this TextField text when extracted value from.
+ //
+ // The DefineEditTextVariableNameTest.swf file under
+ // testsuite/misc-ming.all gives an idea of the problem
+ // (in particular it shows a case in which VariableName is
+ // outside of TextField timeline/scope)
+ //
+ //ch->set_name(m_variable_name.c_str());
+
+ return ch;
+}
+
+
+void
+DefineEditTextTag::read(SWFStream& in, movie_definition& m)
+{
+
+ _rect.read(in);
+
+ in.align();
+ in.ensureBytes(2);
+
+ int flags = in.read_u8();
+ _hasText = flags & (1 << 7);
+ _wordWrap = flags & (1 << 6);
+ _multiline = flags & (1 << 5);
+ _password = flags & (1 << 4);
+ _readOnly = flags & (1 << 3);
+
+ bool hasColor = flags & (1 << 2);
+ bool hasMaxChars = flags & (1 << 1);
+ bool hasFont = flags & (1 << 0);
+
+ flags = in.read_u8();
+ // 0: no font class, 1 font class and height, can't be true if has_font
was true
+ bool hasFontClass = flags & (1 << 7);
+ if (hasFontClass && hasFont )
+ {
+ IF_VERBOSE_MALFORMED_SWF(
+ log_swferror("DefineEditText: hasFontClass can't be true if
hasFont "
+ "is true, ignoring");
+ );
+ hasFontClass = false;
+ }
+
+ _autoSize = flags & (1 << 6);
+ bool hasLayout = flags & (1 << 5);
+ _noSelect = flags & (1 << 4);
+ _border = flags & (1 << 3);
+
+ // authored as static text (not dynamic text)
+ bool wasStatic = flags & (1 << 2);
+
+ // TODO: what is this for?
+ UNUSED(wasStatic);
+
+ _html = flags & (1 << 1);
+ _useOutlines = flags & (1 << 0);
+
+ if (hasFont)
+ {
+ in.ensureBytes(4);
+ _fontID = in.read_u16();
+ _font = m.get_font(_fontID);
+ if (!_font)
+ {
+ IF_VERBOSE_MALFORMED_SWF(
+ log_swferror("DefineEditText: tag refers to unknown
font "
+ "id %d", _fontID);
+ );
+ }
+ _textHeight = in.read_u16();
+ }
+ else if (hasFontClass)
+ {
+ std::string fontClassName;
+ in.read_string(fontClassName);
+ log_unimpl("Font class support for DefineEditText (%d)",
+ fontClassName);
+ }
+
+ if (hasColor)
+ {
+ _color.read_rgba(in);
+ }
+
+ if (hasMaxChars)
+ {
+ in.ensureBytes(2);
+ _maxChars = in.read_u16();
+ }
+
+ if (hasLayout)
+ {
+ in.ensureBytes(9); //1 + 2 + 2 + 2 + 2
+ _alignment =
static_cast<TextField::TextAlignment>(in.read_u8());
+ _leftMargin = in.read_u16();
+ _rightMargin = in.read_u16();
+ _indent = in.read_s16();
+ _leading = in.read_s16();
+ }
+
+ in.read_string(_variableName);
+
+ if (_hasText)
+ {
+ in.read_string(_defaultText);
+ }
+
+ IF_VERBOSE_PARSE (
+ log_parse("edit_text_char:\n"
+ " varname = %s\n"
+ " text = \"%s\"\n"
+ " font_id: %d\n"
+ " text_height: %d",
+ _variableName, _defaultText, _fontID, _textHeight);
+ );
+}
+
+DefineEditTextTag::DefineEditTextTag(SWFStream& in, movie_definition& m)
+ :
+ _hasText(true),
+ _wordWrap(false),
+ _multiline(false),
+ _password(false),
+ _readOnly(true),
+ _autoSize(false),
+ _noSelect(false),
+ _border(false),
+ _html(false),
+ _useOutlines(false),
+ _fontID(-1),
+ _textHeight(1),
+ _maxChars(0),
+ _alignment(TextField::ALIGN_LEFT),
+ _leftMargin(0),
+ _rightMargin(0),
+ _indent(0),
+ _leading(0)
+{
+ _color.set(0, 0, 0, 255);
+
+ // Parse the tag from the stream.
+ read(in, m);
+}
+
+}
+}
=== added file 'libcore/swf/DefineEditTextTag.h'
--- a/libcore/swf/DefineEditTextTag.h 1970-01-01 00:00:00 +0000
+++ b/libcore/swf/DefineEditTextTag.h 2008-11-06 13:56:00 +0000
@@ -0,0 +1,331 @@
+//
+// Copyright (C) 2007, 2008 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
+
+#ifndef GNASH_SWF_DEFINEEDITTEXTTAG_H
+#define GNASH_SWF_DEFINEEDITTEXTTAG_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "rect.h"
+#include "character_def.h"
+#include "swf.h" // for tag_type definition
+#include "RGBA.h"
+#include "TextField.h"
+// Move to cpp:
+#include "font.h"
+
+#include <boost/cstdint.hpp> // for boost::uint16_t and friends
+
+
+// Forward declarations
+namespace gnash {
+ class SWFStream;
+ class movie_definition;
+ class RunInfo;
+ class font;
+}
+
+namespace gnash {
+namespace SWF {
+
+/// SWF Tag DefineEditText (37).
+//
+///
+/// Virtual control tag for syncing streaming sound to playhead
+///
+/// Gnash will register instances of this ControlTag in the
+/// frame containing blocks of a streaming sound, which is
+/// occurrences of SWF Tag StreamSoundBlock (19).
+///
+/// The tag will then be used to start playing the specific block
+/// in sync with the frame playhead.
+///
+class DefineEditTextTag : public character_def
+{
+
+public:
+
+ DefineEditTextTag(SWFStream& in, movie_definition& m);
+
+ ~DefineEditTextTag() {}
+
+ /// Load an SWF::DEFINEEDITTEXT (37) tag.
+ static void loader(SWFStream& in, tag_type tag, movie_definition& m,
const RunInfo& r);
+
+ const rect& get_bound() const { return _rect; }
+
+ character* create_character_instance(character* parent, int id);
+
+ /// How many of these are necessary?
+
+ /// Get width of this definition in twips (by definition)
+ //float width() const { return _rect.width(); }
+
+ /// Get height of this definition in twips (by definition)
+ //float height() const { return _rect.height(); }
+
+ /// Return a reference to the default text associated
+ /// with this EditText definition.
+ const std::string& defaultText() const {
+ return _defaultText;
+ }
+
+ /// Return a reference to the "VariableName" associated
+ /// with this EditText definition. The variable name
+ /// is allowed to contain path information and should
+ /// be used to provide an 'alias' to the 'text' member
+ /// of instances.
+ const std::string& variableName() const {
+ return _variableName;
+ }
+
+ /// Return the maximum length of text this widget can hold.
+ //
+ /// If zero, the text length is unlimited.
+ ///
+ unsigned int maxChars() const {
+ return _maxChars;
+ }
+
+ /// Set boundaries of this textfield
+ //
+ /// This method is used for dynamic textfields
+ /// (actionscript created)
+ ///
+ void set_bounds(const rect& bounds)
+ {
+ _rect = bounds;
+ }
+
+ /// Get right margin in twips
+ boost::uint16_t rightMargin() const {
+ return _rightMargin;
+ }
+
+ /// Get left margin in twips
+ boost::uint16_t leftMargin() const {
+ return _leftMargin;
+ }
+
+ /// Get indentation in twips
+ boost::uint16_t indent() const {
+ return _indent;
+ }
+
+ /// Get height of font in twips.
+ // @@ what if has_font is false ??
+ boost::uint16_t textHeight() const {
+ return _textHeight;
+ }
+
+ /// Set height of font in twips.
+ //
+ /// Used by dynamically created textfields.
+ ///
+ void setFontHeight(boost::uint16_t h) {
+ _textHeight = h;
+ }
+
+ /// Get color of the text
+ const rgba& color() const {
+ return _color;
+ }
+
+ /// Set color of the text
+ void setTextColor(const rgba& col) {
+ _color = col;
+ }
+
+ /// \brief
+ /// Get extra space between lines (in twips).
+ //
+ /// This is in addition to default font line spacing.
+ boost::uint16_t leading() const {
+ return _leading;
+ }
+
+ bool multiline() const {
+ return _multiline;
+ }
+
+ bool password() const {
+ return _password;
+ }
+
+ /// Get text alignment
+ TextField::TextAlignment alignment() const {
+ return _alignment;
+ }
+
+ /// Is border requested ?
+ bool border() const {
+ return _border;
+ }
+
+ /// Word wrap requested ?
+ bool wordWrap() const {
+ return _wordWrap;
+ }
+
+ /// Has text defined ?
+ bool hasText() const {
+ return _hasText;
+ }
+
+ bool readOnly() const
+ {
+ return _readOnly;
+ }
+
+ bool noSelect() const
+ {
+ return _noSelect;
+ }
+
+ /// Return true if HTML was allowed by definition
+ bool html() const { return _html; }
+
+ /// Return true if this character definition requested use of device
fonts
+ //
+ /// Used by TextFielf constructor to set its default.
+ ///
+ bool getUseEmbeddedGlyphs() const
+ {
+ return _useOutlines;
+ }
+
+ boost::intrusive_ptr<font> getFont() const
+ {
+ return _font;
+ }
+
+protected:
+
+#ifdef GNASH_USE_GC
+ void markReachableResources() const
+ {
+ if (_font) _font->setReachable();
+ }
+#endif
+
+private:
+
+ void read(SWFStream& in, movie_definition& m);
+
+ rect _rect;
+ std::string _variableName;
+
+ // For an SWF-defined textfield we'll read
+ // this from the tag. Dynamic textfields should
+ // behave as always having text by default (not tested).
+ bool _hasText;
+ bool _wordWrap;
+ bool _multiline;
+
+ /// show asterisks instead of actual characters
+ bool _password;
+ bool _readOnly;
+ /// resize our bound to fit the text
+ bool _autoSize;
+ bool _noSelect;
+
+ /// forces white background and black border.
+ /// silly, but sometimes used
+ bool _border;
+
+ /// Allowed HTML (from Alexis SWF Reference).
+ //
+ /// <a href=url target=targ>...</a> -- hyperlink
+ /// <b>...</b> -- bold
+ /// <br> -- line break
+ /// <font face=name size=[+|-][0-9]+ color=#RRGGBB>...</font> -- font
change; size in TWIPS
+ /// <i>...</i> -- italic
+ /// <li>...</li> -- list item
+ /// <p>...</p> -- paragraph
+ /// <tab> -- insert tab
+ /// <TEXTFORMAT> </TEXTFORMAT>
+ /// [ BLOCKINDENT=[0-9]+ ]
+ /// [ INDENT=[0-9]+ ]
+ /// [ LEADING=[0-9]+ ]
+ /// [ LEFTMARGIN=[0-9]+ ]
+ /// [ RIGHTMARGIN=[0-9]+ ]
+ /// [ TABSTOPS=[0-9]+{,[0-9]+} ]
+ ///
+ /// Change the different parameters as indicated. The
+ /// sizes are all in TWIPs. There can be multiple
+ /// positions for the tab stops. These are seperated by
+ /// commas.
+ /// <U>...</U> -- underline
+ ///
+ bool _html;
+
+ /// \brief
+ /// When true, use specified SWF internal font (embed fonts)
+ /// Otherwise, use specified device font (or a default one if m_font_id
is -1)
+ ///
+ /// Also known as USE_GLYPH (from Ming)
+ ///
+ // For an SWF-defined textfield we'll read
+ // this from the tag. Dynamic textfields should
+ // use device fonts by default (so not use outline ones)
+ bool _useOutlines;
+
+ int _fontID;
+ boost::intrusive_ptr<font> _font;
+
+ /// height of font text, in twips
+ // TODO: initialize to a meaningful value (see MovieClip::add_textfield)
+ // and make sure get_font_height is not called for rendering purposes
+ // (instead call a method of edit_text_character_def)
+ boost::uint16_t _textHeight;
+
+ /// Text color
+ rgba _color;
+
+ /// Maximum length of text this widget can display (number of chars?)
+ //
+ /// If zero, the text length is unlimited.
+ ///
+ unsigned int _maxChars;
+
+ TextField::TextAlignment _alignment;
+
+ /// extra space between box's left border and text (in twips)
+ boost::uint16_t _leftMargin;
+
+ /// extra space between box's right border and text (in twips)
+ boost::uint16_t _rightMargin;
+
+ /// how much to indent the first line of multiline text (in twips)
+ boost::uint16_t _indent;
+
+ /// \brief
+ /// Extra space between lines
+ /// (in addition to default font line spacing)
+ boost::uint16_t _leading;
+
+ /// The default text to be displayed
+ std::string _defaultText;
+};
+
+
+} // namespace gnash::SWF
+} // namespace gnash
+
+#endif
=== modified file 'libcore/swf/tag_loaders.cpp'
--- a/libcore/swf/tag_loaders.cpp 2008-10-30 13:15:12 +0000
+++ b/libcore/swf/tag_loaders.cpp 2008-11-06 11:56:50 +0000
@@ -50,7 +50,6 @@
#include "swf.h"
#include "swf/TagLoadersTable.h"
#include "text_character_def.h"
-#include "edit_text_character_def.h"
#include "URL.h"
#include "GnashException.h"
#include "video_stream_def.h"
@@ -1148,23 +1147,6 @@
m.importResources(source_movie, imports);
}
-// Read a DefineText tag.
-void define_edit_text_loader(SWFStream& in, tag_type tag, movie_definition& m,
- const RunInfo& /*r*/)
-{
- assert(tag == SWF::DEFINEEDITTEXT); // 37
-
- in.ensureBytes(2);
- boost::uint16_t character_id = in.read_u16();
-
- edit_text_character_def* ch = new edit_text_character_def();
- IF_VERBOSE_PARSE(
- log_parse(_("edit_text_char, id = %d"), character_id);
- );
- ch->read(in, tag, m);
-
- m.add_character(character_id, ch);
-}
// See description in header
void
=== modified file 'libcore/swf/tag_loaders.h'
--- a/libcore/swf/tag_loaders.h 2008-10-29 08:21:28 +0000
+++ b/libcore/swf/tag_loaders.h 2008-11-06 11:56:50 +0000
@@ -99,10 +99,6 @@
void define_text_loader(SWFStream&, tag_type, movie_definition&,
const RunInfo&);
-/// Read an SWF::DEFINEEDITTEXT tag.
-void define_edit_text_loader(SWFStream&, tag_type, movie_definition&,
- const RunInfo&);
-
void place_object_2_loader(SWFStream&, tag_type, movie_definition&,
const RunInfo&);
=== modified file 'libcore/vm/ASHandlers.cpp'
--- a/libcore/vm/ASHandlers.cpp 2008-10-30 16:46:00 +0000
+++ b/libcore/vm/ASHandlers.cpp 2008-11-06 19:20:46 +0000
@@ -2543,14 +2543,59 @@
assert(thread.atActionTag(SWF::ACTION_DELETE)); // 0x3A
#endif
- // TODO: some parameter checking ?
- const std::string& propname = env.top(0).to_string();
- boost::intrusive_ptr<as_object> obj = env.top(1).to_object();
-
- if ( ! obj )
+ // Stack Result
+ // 'a' | nothing
+ // 'a.b' | a.b deleted.
+ // 'b' | a [obj] a.b deleted (normal use).
+ // 'a.b' | a [obj] nothing.
+ // 'a.b' | 'string' nothing.
+ // 'c' | a.b [obj] a.b.c deleted (normal use).
+ // 'a.b.c' | a.b.c deleted
+ // 'b.c' | a [obj] nothing
+ // 'a.b.c' | string nothing
+
+ const size_t stackSize = env.stack_size();
+ const int version = env.getVM().getSWFVersion();
+
+ std::string propertyname = env.top(0).to_string();
+
+ boost::intrusive_ptr<as_object> obj;
+
+ // Behaviour is different according to version. For SWF7 and above,
+ // the delete fails if there aren't two items on the stack. For SWF6
+ // and below, a single item should be parsed to see if it's a path,
+ // then we try to delete it. If it's not a path, we try to delete it as
+ // a variable.
+ //
+ // In both cases, if there are two or more items on the stack, they
+ // have to be property and object.
+ if (stackSize < 2)
+ {
+ if (version > 6) {
+ env.top(1).set_bool(false);
+ env.drop(1);
+ return;
+ }
+
+ std::string path, var;
+ if (!as_environment::parse_path(propertyname, path, var))
+ {
+ // It's not a path. For SWF 7 and above, don't delete. Otherwise
+ // assume it's a variable and try to delete.
+ env.top(1).set_bool(thread.delVariable(propertyname));
+ }
+ else {
+ as_value target = thread.getVariable(path);
+ obj = target.to_object();
+ propertyname = var;
+ }
+ }
+ else obj = env.top(1).to_object();
+
+ if (!obj)
{
IF_VERBOSE_ASCODING_ERRORS(
- log_aserror(_("delete %s.%s : first element is not an object"),
+ log_aserror(_("delete %s.%s: no object found to delete"),
env.top(1), env.top(0));
);
env.top(1).set_bool(false);
@@ -2558,7 +2603,7 @@
return;
}
- env.top(1).set_bool(thread.delObjectMember(*obj, propname));
+ env.top(1).set_bool(thread.delObjectMember(*obj, propertyname));
env.drop(1);
@@ -2567,7 +2612,6 @@
void
SWFHandlers::ActionDelete2(ActionExec& thread)
{
- //GNASH_REPORT_FUNCTION;
as_environment& env = thread.env;
@@ -2575,8 +2619,33 @@
assert(thread.atActionTag(SWF::ACTION_DELETE2)); // 0x3B
#endif
- // See bug #18482, this works fine now (assuming the bug report is correct)
- env.top(0) = thread.delVariable(env.top(0).to_string());
+ const std::string& propertyname = env.top(0).to_string();
+
+ // If it's not a path, delete it as a variable.
+ std::string path, var;
+ if (!as_environment::parse_path(propertyname, path, var)) {
+ // See bug #18482, this works fine now (assuming the bug
+ // report is correct)
+ env.top(0) = thread.delVariable(propertyname);
+ return;
+ }
+
+ // Otherwise see if it's an object and delete it.
+ as_value target = thread.getVariable(path);
+ boost::intrusive_ptr<as_object> obj = target.to_object();
+
+ if (!obj)
+ {
+ IF_VERBOSE_ASCODING_ERRORS(
+ log_aserror(_("delete2 called with a path that does not resolve "
+ "to an object"), env.top(1), env.top(0));
+ );
+ env.top(1).set_bool(false);
+ env.drop(1);
+ return;
+ }
+
+ env.top(1).set_bool(thread.delObjectMember(*obj, var));
}
void
=== modified file 'libcore/vm/ActionExec.cpp'
--- a/libcore/vm/ActionExec.cpp 2008-10-23 18:56:00 +0000
+++ b/libcore/vm/ActionExec.cpp 2008-11-06 19:04:35 +0000
@@ -671,7 +671,7 @@
bool
ActionExec::delVariable(const std::string& name)
{
- return env.del_variable_raw(PROPNAME(name), getScopeStack());
+ return env.delVariableRaw(name, getScopeStack());
}
bool
=== modified file 'testsuite/actionscript.all/TextField.as'
--- a/testsuite/actionscript.all/TextField.as 2008-11-05 10:57:01 +0000
+++ b/testsuite/actionscript.all/TextField.as 2008-11-06 13:56:00 +0000
@@ -103,7 +103,7 @@
xcheck( !TextField.prototype.hasOwnProperty('restrict') );
xcheck( !TextField.prototype.hasOwnProperty('scroll') );
xcheck( !TextField.prototype.hasOwnProperty('selectable') );
-check( !TextField.prototype.hasOwnProperty('text') );
+xcheck( !TextField.prototype.hasOwnProperty('text') );
xcheck( !TextField.prototype.hasOwnProperty('textColor') );
xcheck( !TextField.prototype.hasOwnProperty('textHeight') ); // should be
available on first instantiation
xcheck( !TextField.prototype.hasOwnProperty('textWidth') ); // should be
available on first instantiation
@@ -180,7 +180,7 @@
check( TextField.prototype.hasOwnProperty('restrict') );
check( TextField.prototype.hasOwnProperty('scroll') );
check( TextField.prototype.hasOwnProperty('selectable') );
-xcheck( TextField.prototype.hasOwnProperty('text') );
+check( TextField.prototype.hasOwnProperty('text') );
check( TextField.prototype.hasOwnProperty('textColor') );
check( TextField.prototype.hasOwnProperty('textHeight') );
check( TextField.prototype.hasOwnProperty('textWidth') );
@@ -648,22 +648,22 @@
//
//-------------------------------------------------------------------------
-xcheck_equals(typeof(tf.variable), 'null');
+check_equals(typeof(tf.variable), 'null');
check( ! tf.hasOwnProperty('variable') );
tf.variable = _level0.inputVar;
-xcheck_equals(typeof(tf.variable), 'null'); // _level0.inputVar doesn't exist !
+check_equals(typeof(tf.variable), 'null'); // _level0.inputVar doesn't exist !
tf.variable = 2;
check_equals(typeof(tf.variable), 'string');
check_equals(tf.variable, '2');
tf.variable = undefined;
-xcheck_equals(typeof(tf.variable), 'null');
+check_equals(typeof(tf.variable), 'null');
tf.variable = 2;
tf.variable = null;
-xcheck_equals(typeof(tf.variable), 'null');
+check_equals(typeof(tf.variable), 'null');
tf.variable = "_level0.inputVar";
check_equals(tf.variable, '_level0.inputVar');
xcheck_equals(typeof(_level0.inputVar), 'undefined');
-xcheck_equals(tf.text, "hello world"); // as _level0.inputVar is unexistent
+check_equals(tf.text, "hello world"); // as _level0.inputVar is unexistent
xcheck(!_level0.hasOwnProperty('inputVar'));
_level0.inputVar = "dynamic variable";
check_equals(tf.text, "dynamic variable");
@@ -671,9 +671,9 @@
check_equals(_level0.inputVar, "back-propagated");
o = new Object();
tf.variable = "_level0.o.t"; // non-existent member (yet)
-xcheck_equals(tf.text, "back-propagated"); // _level0.o.t doesn't exist yet
+check_equals(tf.text, "back-propagated"); // _level0.o.t doesn't exist yet
o.t = "from object"; // here we create _level0.o.t
-xcheck_equals(tf.text, "back-propagated"); // but creating _level0.o.t doesn't
trigger textfield text update
+check_equals(tf.text, "back-propagated"); // but creating _level0.o.t doesn't
trigger textfield text update
tf.text = "back-to-object"; // instead, assigning to TextField.text updates
the object
check_equals(o.t, "back-to-object");
o.t = "from object again"; // but updates to the object still don't update the
TextField
=== modified file 'testsuite/actionscript.all/delete.as'
--- a/testsuite/actionscript.all/delete.as 2008-03-11 19:31:46 +0000
+++ b/testsuite/actionscript.all/delete.as 2008-11-06 19:32:45 +0000
@@ -70,8 +70,182 @@
check(!delete obj.a);
check(!delete unexistent.a);
-// TODO: try other malformed ActionDelete calls
// TODO: test deletion of variables referenced by path (slash-based or
dot-based)
// make sure to test use of 'this' here too !
-totals();
+
+// --------------------------------------------------------
+// Check malformed delete calls. Most of these work anyway.
+// --------------------------------------------------------
+
+#if MING_VERSION_CODE >= 00040300
+
+/* Check normal deletes. The first probably uses delete, the second
+ probably delete2 */
+o = 5;
+delete o;
+check_equals(o, undefined);
+
+o = {};
+o.b = 5;
+delete o.b;
+check_equals(o.b, undefined);
+
+/* Check deleting a single variable with delete and delete2. This should fail
+ with delete */
+o = 5;
+asm {
+ push 'o'
+ delete
+ pop
+};
+#if OUTPUT_VERSION < 7
+ check_equals(o, undefined)
+#else
+ check_equals(o, 5);
+#endif
+
+o = 5;
+asm {
+ push 'o'
+ delete2
+ pop
+};
+
+check_equals(o, undefined);
+
+/* Check deleting a path with delete and delete2 */
+o = {};
+o.b = 5;
+asm {
+ push 'o.b'
+ delete
+ pop
+};
+#if OUTPUT_VERSION < 7
+ check_equals(o.b, undefined)
+#else
+ check_equals(o.b, 5);
+#endif
+
+o = {};
+o.b = 5;
+asm {
+ push 'o.b'
+ delete2
+ pop
+};
+
+check_equals(o.b, undefined);
+
+/* Check deleting a path with an object on the stack. This should fail
+ for delete, but work for delete2 */
+o = {};
+o.b = 5;
+asm {
+ push 'o'
+ getvariable
+ push 'o.b'
+ delete
+ pop
+};
+
+check_equals(o.b, 5);
+
+o = {};
+o.b = 5;
+asm {
+ push 'o'
+ getvariable
+ push 'o.b'
+ delete2
+ pop
+};
+
+check_equals(o.b, undefined);
+
+/* Check deleting a path with a string on the stack. This should fail
+ for delete, but work for delete2 */
+o = {};
+o.b = 5;
+asm {
+ push 'string'
+ push 'o.b'
+ delete
+ pop
+};
+
+check_equals(o.b, 5);
+
+o = {};
+o.b = 5;
+asm {
+ push 'string'
+ push 'o.b'
+ delete2
+ pop
+};
+
+check_equals(o.b, undefined);
+
+/* Check deleting a path relative to an object on the stack. This should fail
+ for both */
+o = {};
+o.b = {};
+o.b.c = 5;
+asm {
+ push 'o'
+ getvariable
+ push 'b.c'
+ delete
+ pop
+};
+
+check_equals(o.b.c, 5);
+
+o = {};
+o.b = {};
+o.b.c = 5;
+asm {
+ push 'o'
+ getvariable
+ push 'b.c'
+ delete2
+ pop
+};
+
+check_equals(o.b.c, 5);
+
+/* Check deleting a property with getVariable used on a path. This doesn't have
+ much to do with delete, but it should work for delete */
+o = {};
+o.b = {};
+o.b.c = 5;
+asm {
+ push 'o.b'
+ getvariable
+ push 'c'
+ delete
+ pop
+};
+
+check_equals(o.b.c, undefined);
+
+o = {};
+o.b = {};
+o.b.c = 5;
+asm {
+ push 'o.b'
+ getvariable
+ push 'c'
+ delete2
+ pop
+};
+
+check_equals(o.b.c, 5);
+
+
+totals(41);
+#else
+totals()
+#endif
=== modified file 'testsuite/misc-ming.all/DefineEditTextTest.c'
--- a/testsuite/misc-ming.all/DefineEditTextTest.c 2008-11-03 18:25:59
+0000
+++ b/testsuite/misc-ming.all/DefineEditTextTest.c 2008-11-06 14:04:55
+0000
@@ -142,7 +142,7 @@
// should be true.
check(mo, "TextField.prototype.hasOwnProperty('background')");
check(mo, "TextField.prototype.hasOwnProperty('backgroundColor')");
- xcheck(mo, "TextField.prototype.hasOwnProperty('text')");
+ check(mo, "TextField.prototype.hasOwnProperty('text')");
check(mo, "TextField.prototype.hasOwnProperty('textColor')");
/*********************************************
@@ -188,7 +188,7 @@
// checks after placing some swf defined TextField
check(mo, "TextField.prototype.hasOwnProperty('background')");
check(mo, "TextField.prototype.hasOwnProperty('backgroundColor')");
- xcheck(mo, "TextField.prototype.hasOwnProperty('text')");
+ check(mo, "TextField.prototype.hasOwnProperty('text')");
check(mo, "TextField.prototype.hasOwnProperty('textColor')");
xcheck(mo, "!TextField.prototype.hasOwnProperty('_parent')");
xcheck(mo, "!TextField.prototype.hasOwnProperty('_xmouse')");
@@ -227,7 +227,7 @@
check(mo, "!etext1.hasOwnProperty('_xscale')");
check(mo, "!etext1.hasOwnProperty('_yscale')");
- xcheck(mo, "dtext1.__proto__.hasOwnProperty('text')");
+ check(mo, "dtext1.__proto__.hasOwnProperty('text')");
check_equals(mo, "dtext1.__proto__.hasOwnProperty('background')", "true");
check_equals(mo, "dtext1.__proto__.hasOwnProperty('backgroundColor')",
"true");
check_equals(mo, "dtext1.__proto__.hasOwnProperty('textColor')", "true");
=== modified file 'testsuite/swfdec/PASSING'
--- a/testsuite/swfdec/PASSING 2008-11-03 08:02:31 +0000
+++ b/testsuite/swfdec/PASSING 2008-11-06 14:03:09 +0000
@@ -266,6 +266,18 @@
crash-0.8.0-huffmann-table-6.swf:a269bc06dd35de125087b2444622f130
crash-0.8.0-huffmann-table-7.swf:2134c93509e1fc5d2eff527e79e1ea60
crash-0.8.0-huffmann-table-8.swf:4548f1e9d10a5cd70852c367c8f39af6
+crash-0.8.2-gotoAndPlay-5.swf:8b4ebc57963ce4c0b8c80a1ba79a2ed0
+crash-0.8.2-gotoAndPlay-6.swf:808289d1821d14debfaea5aca5f14273
+crash-0.8.2-gotoAndPlay-7.swf:434c0a520e86655e14ac3767cb745dbc
+crash-0.8.2-gotoAndPlay-8.swf:26aa36651e9882257c65bf70abd79bca
+crash-0.8.2-sendAndLoad-without-target-5.swf:d2a5093d2d9094c89e9ba1b1956e566d
+crash-0.8.2-sendAndLoad-without-target-6.swf:91e40b45f08ecae5582af816dd2f4f99
+crash-0.8.2-sendAndLoad-without-target-7.swf:e9284acf35bc444e2600721b4f2b8067
+crash-0.8.2-sendAndLoad-without-target-8.swf:7fb6a52bbb2d9e9896fdb4e0d3602c36
+crash-0.9.1-getvariable-shapes-5.swf:5d55b2511943ac08b0565d8e84447b4a
+crash-0.9.1-getvariable-shapes-6.swf:45e434a401447915500c275c238b8ac0
+crash-0.9.1-getvariable-shapes-7.swf:49f7609f50e4099528b3477b7124834c
+crash-0.9.1-getvariable-shapes-8.swf:9827e209d6bf155d49fcdb4e15cf0442
createTextField-returnvalue-6.swf:876f64cb4349313be58d1b9de5ca2ff4
createTextField-returnvalue-7.swf:397473c78af05cbb9e7e394ec4ce1a07
createTextField-returnvalue-8.swf:398e15cdabb4c9f9bdb56ee5b07e5126
@@ -569,6 +581,8 @@
movieclip-lockroot-loadmovie-7.swf:84ad9218797251db3ee79f9241f27b67
movieclip-lockroot-loadmovie-8.swf:3ac7430bf84185e34aee32b2d2394600
movieclip-property-priorities-5.swf:21ffe3baf551c2dea5d2e04db214ff7f
+movieclip-references-5.swf:1a9faa42d479cff63da56135c1b298aa
+movieclip-references-6.swf:d3cc27ec41e9368c21f27fee48027b89
movieclip-set-prototype-5.swf:99235a738d69d9c78fa2bc5d355c6dae
movieclip-set-prototype-6.swf:bae79ccbb89bb7c11cd1961d2c473022
movieclip-set-prototype-7.swf:f147fff166cc46cdcda77d5012faddb0
@@ -1072,6 +1086,9 @@
text-field-hscroll-5.swf:f0b6b2bdc087164334da9fad1ca0140a
text-field-init-5.swf:f9c095838e41c5b00de362cef6c20167
text-field-init-native-5.swf:881f1f6314617bd2d789fa99f9765e60
+text-field-init-native-6.swf:39c6fb4139696e3334b64fb4e48376e1
+text-field-init-native-7.swf:167277605ec309a453caa1b713afbc45
+text-field-init-native-8.swf:86e8f2d4419f1747735f180d22030701
text-field-replace-text-5.swf:571ec2f1d311c65f98e5e7f76392cb9e
text-field-replace-text-5.swf:e89d3694aef9f668e714916e8db3195f
text-field-set-text-format-5.swf:f576da900f9e9b8d911f6791d4114983
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10233: Fix abort in delete2 and correct implementation after testing.,
Benjamin Wolsey <=