[Swfdec] 18 commits - libswfdec/swfdec_player_internal.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_format.c libswfdec/swfdec_text_format.h libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/trace

Pekka Lampila medar at kemper.freedesktop.org
Thu Oct 25 01:50:56 PDT 2007


 dev/null                                          |binary
 libswfdec/swfdec_player_internal.h                |    2 
 libswfdec/swfdec_text_field_movie_as.c            |   57 +++++---
 libswfdec/swfdec_text_format.c                    |   13 +
 libswfdec/swfdec_text_format.h                    |    1 
 libswfdec/swfdec_xml.c                            |   72 ++++++----
 libswfdec/swfdec_xml_node.c                       |  118 ++++++++++-------
 libswfdec/swfdec_xml_node.h                       |    5 
 test/trace/Makefile.am                            |   59 +++++++-
 test/trace/text-field-get-text-format-5.swf       |binary
 test/trace/text-field-get-text-format-5.swf.trace |   10 +
 test/trace/text-field-get-text-format-6.swf       |binary
 test/trace/text-field-get-text-format-6.swf.trace |  101 ++++++++++++++
 test/trace/text-field-get-text-format-7.swf       |binary
 test/trace/text-field-get-text-format-7.swf.trace |   88 ++++++++++++
 test/trace/text-field-get-text-format-8.swf       |binary
 test/trace/text-field-get-text-format-8.swf.trace |   88 ++++++++++++
 test/trace/text-field-get-text-format.as          |   58 ++++++++
 test/trace/text-field-init-5.swf                  |binary
 test/trace/text-field-init-5.swf.trace            |   12 +
 test/trace/text-field-init-6.swf                  |binary
 test/trace/text-field-init-6.swf.trace            |   12 +
 test/trace/text-field-init-7.swf                  |binary
 test/trace/text-field-init-7.swf.trace            |   12 +
 test/trace/text-field-init-8.swf                  |binary
 test/trace/text-field-init-8.swf.trace            |   12 +
 test/trace/text-field-init.as                     |   47 ++++++
 test/trace/text-field-scroll-5.swf                |binary
 test/trace/text-field-scroll-5.swf.trace          |   18 +-
 test/trace/text-field-scroll-6.swf                |binary
 test/trace/text-field-scroll-6.swf.trace          |   16 +-
 test/trace/text-field-scroll-7.swf                |binary
 test/trace/text-field-scroll-7.swf.trace          |   18 +-
 test/trace/text-field-scroll-8.swf                |binary
 test/trace/text-field-scroll-8.swf.trace          |   18 +-
 test/trace/text-field-scroll.as                   |    6 
 test/trace/text-field-set-text-format-5.swf       |binary
 test/trace/text-field-set-text-format-5.swf.trace |   19 ++
 test/trace/text-field-set-text-format-6.swf       |binary
 test/trace/text-field-set-text-format-6.swf.trace |  149 ++++++++++++++++++++++
 test/trace/text-field-set-text-format-7.swf       |binary
 test/trace/text-field-set-text-format-7.swf.trace |  139 ++++++++++++++++++++
 test/trace/text-field-set-text-format-8.swf       |binary
 test/trace/text-field-set-text-format-8.swf.trace |  139 ++++++++++++++++++++
 test/trace/text-field-set-text-format.as          |   95 ++++++++++++++
 test/trace/textformat-init-5.swf                  |binary
 test/trace/textformat-init-5.swf.trace            |   11 +
 test/trace/textformat-init-6.swf                  |binary
 test/trace/textformat-init-6.swf.trace            |   11 +
 test/trace/textformat-init-7.swf                  |binary
 test/trace/textformat-init-7.swf.trace            |   11 +
 test/trace/textformat-init-8.swf                  |binary
 test/trace/textformat-init-8.swf.trace            |   11 +
 test/trace/textformat-init.as                     |   38 +++++
 test/trace/xml-constructor-properties-5.swf.trace |   60 --------
 test/trace/xml-constructor-properties-6.swf.trace |   60 --------
 test/trace/xml-constructor-properties-7.swf.trace |   60 --------
 test/trace/xml-constructor-properties.as          |   68 ----------
 test/trace/xml-init-5.swf                         |binary
 test/trace/xml-init-5.swf.trace                   |    3 
 test/trace/xml-init-6.swf                         |binary
 test/trace/xml-init-6.swf.trace                   |    3 
 test/trace/xml-init-7.swf                         |binary
 test/trace/xml-init-7.swf.trace                   |    3 
 test/trace/xml-init-8.swf                         |binary
 test/trace/xml-init-8.swf.trace                   |    3 
 test/trace/xml-init.as                            |   19 ++
 test/trace/xml-node-init-5.swf                    |binary
 test/trace/xml-node-init-5.swf.trace              |   11 +
 test/trace/xml-node-init-6.swf                    |binary
 test/trace/xml-node-init-6.swf.trace              |   11 +
 test/trace/xml-node-init-7.swf                    |binary
 test/trace/xml-node-init-7.swf.trace              |   11 +
 test/trace/xml-node-init-8.swf                    |binary
 test/trace/xml-node-init-8.swf.trace              |   11 +
 test/trace/xml-node-init.as                       |   38 +++++
 76 files changed, 1429 insertions(+), 398 deletions(-)

New commits:
commit d625a49303ebd5ef513c1ef58a5090dc0f1a221f
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:47:33 2007 +0300

    Add a test to see when TextField's native properties are initialized

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 22a2354..aa7b8e8 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -1875,6 +1875,13 @@ EXTRA_DIST = \
 	text-field-html-input-7.swf.trace \
 	text-field-html-input-8.swf \
 	text-field-html-input-8.swf.trace \
+	text-field-init.as \
+	text-field-init-6.swf \
+	text-field-init-6.swf.trace \
+	text-field-init-7.swf \
+	text-field-init-7.swf.trace \
+	text-field-init-8.swf \
+	text-field-init-8.swf.trace \
 	text-field-length.as \
 	text-field-length-5.swf \
 	text-field-length-5.swf.trace \
diff --git a/test/trace/text-field-init-5.swf b/test/trace/text-field-init-5.swf
new file mode 100644
index 0000000..2a88316
Binary files /dev/null and b/test/trace/text-field-init-5.swf differ
diff --git a/test/trace/text-field-init-5.swf.trace b/test/trace/text-field-init-5.swf.trace
new file mode 100644
index 0000000..82891b5
--- /dev/null
+++ b/test/trace/text-field-init-5.swf.trace
@@ -0,0 +1,12 @@
+Check when TextField's native properties are initialized
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/text-field-init-6.swf b/test/trace/text-field-init-6.swf
new file mode 100644
index 0000000..9bdea3e
Binary files /dev/null and b/test/trace/text-field-init-6.swf differ
diff --git a/test/trace/text-field-init-6.swf.trace b/test/trace/text-field-init-6.swf.trace
new file mode 100644
index 0000000..877cf53
--- /dev/null
+++ b/test/trace/text-field-init-6.swf.trace
@@ -0,0 +1,12 @@
+Check when TextField's native properties are initialized
+false
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/text-field-init-7.swf b/test/trace/text-field-init-7.swf
new file mode 100644
index 0000000..e67ecaf
Binary files /dev/null and b/test/trace/text-field-init-7.swf differ
diff --git a/test/trace/text-field-init-7.swf.trace b/test/trace/text-field-init-7.swf.trace
new file mode 100644
index 0000000..877cf53
--- /dev/null
+++ b/test/trace/text-field-init-7.swf.trace
@@ -0,0 +1,12 @@
+Check when TextField's native properties are initialized
+false
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/text-field-init-8.swf b/test/trace/text-field-init-8.swf
new file mode 100644
index 0000000..5847cb8
Binary files /dev/null and b/test/trace/text-field-init-8.swf differ
diff --git a/test/trace/text-field-init-8.swf.trace b/test/trace/text-field-init-8.swf.trace
new file mode 100644
index 0000000..877cf53
--- /dev/null
+++ b/test/trace/text-field-init-8.swf.trace
@@ -0,0 +1,12 @@
+Check when TextField's native properties are initialized
+false
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/text-field-init.as b/test/trace/text-field-init.as
new file mode 100644
index 0000000..336f1ce
--- /dev/null
+++ b/test/trace/text-field-init.as
@@ -0,0 +1,47 @@
+// makeswf -v 7 -r 1 -o textfield-init-7.swf textfield-init.as
+
+function check_and_reset () {
+  _global.TextField.prototype.hasOwnProperty = ASnative (101, 5);
+  trace (_global.TextField.prototype.hasOwnProperty ("text"));
+  _global.TextField.prototype = new Object ();
+}
+
+trace ("Check when TextField's native properties are initialized");
+
+// FIXME: Not tested yet: The properties should only be created if the
+// prototype Object has not been initialized by any object's constructor with
+// native properties (TextField, TextFormat, XML, XMLNode at least)
+
+check_and_reset ();
+
+var tmp = new TextField ();
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0, 100, 100);
+check_and_reset ();
+
+this.createTextField ();
+check_and_reset ();
+
+this.createTextField ("t");
+check_and_reset ();
+
+this.createTextField ("t", 0);
+check_and_reset ();
+
+this.createTextField ("t", 0, 0);
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0);
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0, 100);
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0, 100, undefined);
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0, -5, -5);
+check_and_reset ();
+
+loadMovie ("FSCommand:quit", "");
commit 51a48c4d823ce1b3215bf8f25cd9c50572be54c4
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:40:37 2007 +0300

    Add test to see when TextFormat's native properties are initialized

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 2c5d598..22a2354 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -1929,6 +1929,15 @@ EXTRA_DIST = \
 	textformat-7.swf.trace \
 	textformat-8.swf \
 	textformat-8.swf.trace \
+	textformat-properties.as \
+	textformat-properties-5.swf \
+	textformat-properties-5.swf.trace \
+	textformat-properties-6.swf \
+	textformat-properties-6.swf.trace \
+	textformat-properties-7.swf \
+	textformat-properties-7.swf.trace \
+	textformat-properties-8.swf \
+	textformat-properties-8.swf.trace \
 	textformat-valueof.as \
 	textformat-valueof-5.swf \
 	textformat-valueof-5.swf.trace \
diff --git a/test/trace/textformat-init-5.swf b/test/trace/textformat-init-5.swf
new file mode 100644
index 0000000..3a223ce
Binary files /dev/null and b/test/trace/textformat-init-5.swf differ
diff --git a/test/trace/textformat-init-5.swf.trace b/test/trace/textformat-init-5.swf.trace
new file mode 100644
index 0000000..0eee3fb
--- /dev/null
+++ b/test/trace/textformat-init-5.swf.trace
@@ -0,0 +1,11 @@
+Check when TextFormat's native properties are initialized
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/textformat-init-6.swf b/test/trace/textformat-init-6.swf
new file mode 100644
index 0000000..5ebe00a
Binary files /dev/null and b/test/trace/textformat-init-6.swf differ
diff --git a/test/trace/textformat-init-6.swf.trace b/test/trace/textformat-init-6.swf.trace
new file mode 100644
index 0000000..feaee9f
--- /dev/null
+++ b/test/trace/textformat-init-6.swf.trace
@@ -0,0 +1,11 @@
+Check when TextFormat's native properties are initialized
+false
+true
+false
+false
+true
+false
+true
+false
+false
+false
diff --git a/test/trace/textformat-init-7.swf b/test/trace/textformat-init-7.swf
new file mode 100644
index 0000000..552ff89
Binary files /dev/null and b/test/trace/textformat-init-7.swf differ
diff --git a/test/trace/textformat-init-7.swf.trace b/test/trace/textformat-init-7.swf.trace
new file mode 100644
index 0000000..5368f4e
--- /dev/null
+++ b/test/trace/textformat-init-7.swf.trace
@@ -0,0 +1,11 @@
+Check when TextFormat's native properties are initialized
+false
+true
+true
+false
+true
+false
+true
+false
+false
+false
diff --git a/test/trace/textformat-init-8.swf b/test/trace/textformat-init-8.swf
new file mode 100644
index 0000000..9d93be3
Binary files /dev/null and b/test/trace/textformat-init-8.swf differ
diff --git a/test/trace/textformat-init-8.swf.trace b/test/trace/textformat-init-8.swf.trace
new file mode 100644
index 0000000..5368f4e
--- /dev/null
+++ b/test/trace/textformat-init-8.swf.trace
@@ -0,0 +1,11 @@
+Check when TextFormat's native properties are initialized
+false
+true
+true
+false
+true
+false
+true
+false
+false
+false
diff --git a/test/trace/textformat-init.as b/test/trace/textformat-init.as
new file mode 100644
index 0000000..adfd606
--- /dev/null
+++ b/test/trace/textformat-init.as
@@ -0,0 +1,38 @@
+// makeswf -v 7 -r 1 -o textformat-init-7.swf textformat-init.as
+
+function check_and_reset () {
+  _global.TextFormat.prototype.hasOwnProperty = ASnative (101, 5);
+  trace (_global.TextFormat.prototype.hasOwnProperty ("size"));
+  _global.TextFormat.prototype = new Object ();
+}
+
+trace ("Check when TextFormat's native properties are initialized");
+
+// FIXME: Not tested yet: The properties should only be created if the
+// prototype Object has not been initialized by any object's constructor with
+// native properties (TextField, TextFormat, XML, XMLNode at least)
+
+check_and_reset ();
+var tmp = new TextFormat ();
+check_and_reset ();
+
+var tmp = new TextField.StyleSheet ();
+tmp.parse (".a { text-size: 4; }");
+check_and_reset ();
+
+this.createTextField ("t", 0, 0, 0, 100, 100);
+check_and_reset ();
+t.getNewTextFormat ();
+check_and_reset ();
+t.setNewTextFormat (new Object ());
+check_and_reset ();
+t.getTextFormat ();
+check_and_reset ();
+t.setTextFormat (new Object ());
+check_and_reset ();
+tmp = t.textColor;
+check_and_reset ();
+t.textColor = 200;
+check_and_reset ();
+
+loadMovie ("FSCommand:quit", "");
commit 73387c03485256c86fd0ac735811c21fd96f0035
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:39:02 2007 +0300

    Init TextFormat's properties in right places when using TextField

diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 244c76c..bc810ea 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -963,6 +963,8 @@ swfdec_text_field_movie_getNewTextFormat (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
 
+  swfdec_text_format_init_properties (cx);
+
   SWFDEC_AS_VALUE_SET_OBJECT (ret,
       SWFDEC_AS_OBJECT (swfdec_text_format_copy (text->format_new)));
 }
diff --git a/libswfdec/swfdec_text_format.c b/libswfdec/swfdec_text_format.c
index 4fe215e..e5ab1fa 100644
--- a/libswfdec/swfdec_text_format.c
+++ b/libswfdec/swfdec_text_format.c
@@ -1095,7 +1095,7 @@ swfdec_text_format_clear (SwfdecTextFormat *format)
   swfdec_text_format_mark_set (format, PROP_DISPLAY);
 }
 
-static void
+void
 swfdec_text_format_init_properties (SwfdecAsContext *cx)
 {
   SwfdecAsValue val;
@@ -1219,7 +1219,8 @@ swfdec_text_format_copy (const SwfdecTextFormat *copy_from)
 
   g_return_val_if_fail (SWFDEC_IS_TEXT_FORMAT (copy_from), NULL);
 
-  object_to = swfdec_text_format_new (SWFDEC_AS_OBJECT (copy_from)->context);
+  object_to = swfdec_text_format_new_no_properties (
+      SWFDEC_AS_OBJECT (copy_from)->context);
   if (object_to == NULL)
     return NULL;
   copy_to = SWFDEC_TEXT_FORMAT (object_to);
diff --git a/libswfdec/swfdec_text_format.h b/libswfdec/swfdec_text_format.h
index 85d6d3c..c0b1859 100644
--- a/libswfdec/swfdec_text_format.h
+++ b/libswfdec/swfdec_text_format.h
@@ -95,6 +95,7 @@ gboolean	swfdec_text_format_equal_or_undefined	(const SwfdecTextFormat *a,
 						 const SwfdecTextFormat *b);
 void		swfdec_text_format_remove_different (SwfdecTextFormat *		format,
 						 const SwfdecTextFormat *	from);
+void		swfdec_text_format_init_properties (SwfdecAsContext *		cx);
 
 G_END_DECLS
 #endif
commit 93cba2e6d45683f55fc633a240b6ee6ab3e8ed8b
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:33:13 2007 +0300

    Replace xml-constructor-properties test with xml-init test
    
    Add a FIXME comment to this test and xml-node-init test

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 01ba24c..2c5d598 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -2031,13 +2031,6 @@ EXTRA_DIST = \
 	with-prototypes-6.swf.trace \
 	with-prototypes-7.swf \
 	with-prototypes-7.swf.trace \
-	xml-constructor-properties.as \
-	xml-constructor-properties-5.swf \
-	xml-constructor-properties-5.swf.trace \
-	xml-constructor-properties-6.swf \
-	xml-constructor-properties-6.swf.trace \
-	xml-constructor-properties-7.swf \
-	xml-constructor-properties-7.swf.trace \
 	xml-errors.as \
 	xml-errors-5.swf \
 	xml-errors-5.swf.trace \
@@ -2052,6 +2045,15 @@ EXTRA_DIST = \
 	xml-escape-6.swf.trace \
 	xml-escape-7.swf \
 	xml-escape-7.swf.trace \
+	xml-init.as \
+	xml-init-5.swf \
+	xml-init-5.swf.trace \
+	xml-init-6.swf \
+	xml-init-6.swf.trace \
+	xml-init-7.swf \
+	xml-init-7.swf.trace \
+	xml-init-8.swf \
+	xml-init-8.swf.trace \
 	xml-node.as \
 	xml-node-5.swf \
 	xml-node-5.swf.trace \
diff --git a/test/trace/xml-constructor-properties-5.swf b/test/trace/xml-constructor-properties-5.swf
deleted file mode 100644
index 34ce6d8..0000000
Binary files a/test/trace/xml-constructor-properties-5.swf and /dev/null differ
diff --git a/test/trace/xml-constructor-properties-5.swf.trace b/test/trace/xml-constructor-properties-5.swf.trace
deleted file mode 100644
index 8a5c059..0000000
--- a/test/trace/xml-constructor-properties-5.swf.trace
+++ /dev/null
@@ -1,60 +0,0 @@
-Before anything:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: true
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: true
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: true
-XML: loaded: false
-XMLReal: loaded: true
-XML: status: false
-XMLReal: status: true
-XML: xmlDecl: false
-XMLReal: xmlDecl: true
-After deleting properties:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object again:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
diff --git a/test/trace/xml-constructor-properties-6.swf b/test/trace/xml-constructor-properties-6.swf
deleted file mode 100644
index 566fbcc..0000000
Binary files a/test/trace/xml-constructor-properties-6.swf and /dev/null differ
diff --git a/test/trace/xml-constructor-properties-6.swf.trace b/test/trace/xml-constructor-properties-6.swf.trace
deleted file mode 100644
index 8a5c059..0000000
--- a/test/trace/xml-constructor-properties-6.swf.trace
+++ /dev/null
@@ -1,60 +0,0 @@
-Before anything:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: true
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: true
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: true
-XML: loaded: false
-XMLReal: loaded: true
-XML: status: false
-XMLReal: status: true
-XML: xmlDecl: false
-XMLReal: xmlDecl: true
-After deleting properties:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object again:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
diff --git a/test/trace/xml-constructor-properties-7.swf b/test/trace/xml-constructor-properties-7.swf
deleted file mode 100644
index a3faa0d..0000000
Binary files a/test/trace/xml-constructor-properties-7.swf and /dev/null differ
diff --git a/test/trace/xml-constructor-properties-7.swf.trace b/test/trace/xml-constructor-properties-7.swf.trace
deleted file mode 100644
index 8a5c059..0000000
--- a/test/trace/xml-constructor-properties-7.swf.trace
+++ /dev/null
@@ -1,60 +0,0 @@
-Before anything:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object:
-XML: __constructor__: false
-XMLReal: __constructor__: true
-XML: contentType: false
-XMLReal: contentType: true
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: true
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: true
-XML: loaded: false
-XMLReal: loaded: true
-XML: status: false
-XMLReal: status: true
-XML: xmlDecl: false
-XMLReal: xmlDecl: true
-After deleting properties:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
-After creating an XML object again:
-XML: __constructor__: false
-XMLReal: __constructor__: false
-XML: contentType: false
-XMLReal: contentType: false
-XML: docTypeDecl: false
-XMLReal: docTypeDecl: false
-XML: ignoreWhite: false
-XMLReal: ignoreWhite: false
-XML: loaded: false
-XMLReal: loaded: false
-XML: status: false
-XMLReal: status: false
-XML: xmlDecl: false
-XMLReal: xmlDecl: false
diff --git a/test/trace/xml-constructor-properties.as b/test/trace/xml-constructor-properties.as
deleted file mode 100644
index 2d796bd..0000000
--- a/test/trace/xml-constructor-properties.as
+++ /dev/null
@@ -1,68 +0,0 @@
-// makeswf -v 7 -r 1 -o xml-constructor-properties-7.swf xml-constructor-properties.as
-
-// Tests for when XML.prototype's native properties are created
-
-var properties = [
-  "__constructor__",
-  "contentType",
-  "docTypeDecl",
-  "ignoreWhite",
-  "loaded",
-  "status",
-  "xmlDecl"
-];
-
-var XMLReal = XML;
-XML = String;
-
-#if __SWF_VERSION__ == 5
-XML.prototype.hasOwnProperty = ASnative (101, 5);
-XMLReal.prototype.hasOwnProperty = ASnative (101, 5);
-#endif
-
-trace ("Before anything:");
-
-for (var i = 0; i < properties.length; i++) {
-  trace ("XML: " + properties[i] + ": " +
-      XML.prototype.hasOwnProperty (properties[i]));
-  trace ("XMLReal: " + properties[i] + ": " +
-      XMLReal.prototype.hasOwnProperty (properties[i]));
-}
-
-var a = new XMLReal ();
-
-trace ("After creating an XML object:");
-
-for (var i = 0; i < properties.length; i++) {
-  trace ("XML: " + properties[i] + ": " +
-      XML.prototype.hasOwnProperty (properties[i]));
-  trace ("XMLReal: " + properties[i] + ": " +
-      XMLReal.prototype.hasOwnProperty (properties[i]));
-}
-
-for (var i = 0; i < properties.length; i++) {
-  delete XML.prototype[properties[i]];
-  delete XMLReal.prototype[properties[i]];
-}
-
-trace ("After deleting properties:");
-
-for (var i = 0; i < properties.length; i++) {
-  trace ("XML: " + properties[i] + ": " +
-      XML.prototype.hasOwnProperty (properties[i]));
-  trace ("XMLReal: " + properties[i] + ": " +
-      XMLReal.prototype.hasOwnProperty (properties[i]));
-}
-
-var b = new XMLReal ();
-
-trace ("After creating an XML object again:");
-
-for (var i = 0; i < properties.length; i++) {
-  trace ("XML: " + properties[i] + ": " +
-      XML.prototype.hasOwnProperty (properties[i]));
-  trace ("XMLReal: " + properties[i] + ": " +
-      XMLReal.prototype.hasOwnProperty (properties[i]));
-}
-
-loadMovie ("FSCommand:quit", "");
diff --git a/test/trace/xml-init-5.swf b/test/trace/xml-init-5.swf
new file mode 100644
index 0000000..e91b01f
Binary files /dev/null and b/test/trace/xml-init-5.swf differ
diff --git a/test/trace/xml-init-5.swf.trace b/test/trace/xml-init-5.swf.trace
new file mode 100644
index 0000000..97f3544
--- /dev/null
+++ b/test/trace/xml-init-5.swf.trace
@@ -0,0 +1,3 @@
+Check when XML's native properties are initialized
+undefined
+undefined
diff --git a/test/trace/xml-init-6.swf b/test/trace/xml-init-6.swf
new file mode 100644
index 0000000..d201c57
Binary files /dev/null and b/test/trace/xml-init-6.swf differ
diff --git a/test/trace/xml-init-6.swf.trace b/test/trace/xml-init-6.swf.trace
new file mode 100644
index 0000000..f5be65a
--- /dev/null
+++ b/test/trace/xml-init-6.swf.trace
@@ -0,0 +1,3 @@
+Check when XML's native properties are initialized
+false
+true
diff --git a/test/trace/xml-init-7.swf b/test/trace/xml-init-7.swf
new file mode 100644
index 0000000..90c0127
Binary files /dev/null and b/test/trace/xml-init-7.swf differ
diff --git a/test/trace/xml-init-7.swf.trace b/test/trace/xml-init-7.swf.trace
new file mode 100644
index 0000000..f5be65a
--- /dev/null
+++ b/test/trace/xml-init-7.swf.trace
@@ -0,0 +1,3 @@
+Check when XML's native properties are initialized
+false
+true
diff --git a/test/trace/xml-init-8.swf b/test/trace/xml-init-8.swf
new file mode 100644
index 0000000..583a4e7
Binary files /dev/null and b/test/trace/xml-init-8.swf differ
diff --git a/test/trace/xml-init-8.swf.trace b/test/trace/xml-init-8.swf.trace
new file mode 100644
index 0000000..f5be65a
--- /dev/null
+++ b/test/trace/xml-init-8.swf.trace
@@ -0,0 +1,3 @@
+Check when XML's native properties are initialized
+false
+true
diff --git a/test/trace/xml-init.as b/test/trace/xml-init.as
new file mode 100644
index 0000000..aca54db
--- /dev/null
+++ b/test/trace/xml-init.as
@@ -0,0 +1,19 @@
+// makeswf -v 7 -r 1 -o xml-node-init-7.swf xml-node-init.as
+
+function check_and_reset () {
+  _global.XML.prototype.hasOwnProperty = ASnative (101, 5);
+  trace (_global.XML.prototype.hasOwnProperty ("ignoreWhite"));
+  _global.XML.prototype = new Object ();
+}
+
+trace ("Check when XML's native properties are initialized");
+
+// FIXME: Not tested yet: The properties should only be created if the
+// prototype Object has not been initialized by any object's constructor with
+// native properties (TextField, TextFormat, XML, XMLNode at least)
+
+check_and_reset ();
+var tmp = new XML ();
+check_and_reset ();
+
+loadMovie ("FSCommand:quit", "");
diff --git a/test/trace/xml-node-init.as b/test/trace/xml-node-init.as
index 9e959f8..d87f5c8 100644
--- a/test/trace/xml-node-init.as
+++ b/test/trace/xml-node-init.as
@@ -8,6 +8,10 @@ function check_and_reset () {
 
 trace ("Check when XMLNode's native properties are initialized");
 
+// FIXME: Not tested yet: The properties should only be created if the
+// prototype Object has not been initialized by any object's constructor with
+// native properties (TextField, TextFormat, XML, XMLNode at least)
+
 check_and_reset ();
 var tmp = new XMLNode (1, "test");
 check_and_reset ();
commit 79e1e7977f1bd6f891f5315567ac68c416070d22
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:07:37 2007 +0300

    Add a test case for TextField's setTextFormat method

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 8a195c1..01ba24c 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -1884,6 +1884,15 @@ EXTRA_DIST = \
 	text-field-length-7.swf.trace \
 	text-field-length-8.swf \
 	text-field-length-8.swf.trace \
+	text-field-set-text-format.as \
+	text-field-set-text-format-5.swf \
+	text-field-set-text-format-5.swf.trace \
+	text-field-set-text-format-6.swf \
+	text-field-set-text-format-6.swf.trace \
+	text-field-set-text-format-7.swf \
+	text-field-set-text-format-7.swf.trace \
+	text-field-set-text-format-8.swf \
+	text-field-set-text-format-8.swf.trace \
 	text-field-scroll.as \
 	text-field-scroll-5.swf \
 	text-field-scroll-5.swf.trace \
diff --git a/test/trace/text-field-set-text-format-5.swf b/test/trace/text-field-set-text-format-5.swf
new file mode 100644
index 0000000..1cfe965
Binary files /dev/null and b/test/trace/text-field-set-text-format-5.swf differ
diff --git a/test/trace/text-field-set-text-format-5.swf.trace b/test/trace/text-field-set-text-format-5.swf.trace
new file mode 100644
index 0000000..45fd1d7
--- /dev/null
+++ b/test/trace/text-field-set-text-format-5.swf.trace
@@ -0,0 +1,19 @@
+Starting state:
+all, font:
+undefined
+1, bullet:
+undefined
+-3, bullet:
+undefined
+32, bullet:
+undefined
+3, 6, bullet:
+undefined
+4, 5, !bullet:
+undefined
+-1, 2, bullet:
+undefined
+7, 30, bullet:
+undefined
+20, 30, !bullet:
+undefined
diff --git a/test/trace/text-field-set-text-format-6.swf b/test/trace/text-field-set-text-format-6.swf
new file mode 100644
index 0000000..cb2d23f
Binary files /dev/null and b/test/trace/text-field-set-text-format-6.swf differ
diff --git a/test/trace/text-field-set-text-format-6.swf.trace b/test/trace/text-field-set-text-format-6.swf.trace
new file mode 100644
index 0000000..af140ad
--- /dev/null
+++ b/test/trace/text-field-set-text-format-6.swf.trace
@@ -0,0 +1,149 @@
+Starting state:
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+all, font:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+1, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+-3, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+32, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+3, 6, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=true
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+4, 5, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+-1, 2, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+12: align=left blockIndent=0 bold=false bullet=false
+7, 30, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
+12: align=left blockIndent=0 bold=false bullet=true
+20, 30, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=right blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
+12: align=left blockIndent=0 bold=false bullet=true
diff --git a/test/trace/text-field-set-text-format-7.swf b/test/trace/text-field-set-text-format-7.swf
new file mode 100644
index 0000000..478f9bc
Binary files /dev/null and b/test/trace/text-field-set-text-format-7.swf differ
diff --git a/test/trace/text-field-set-text-format-7.swf.trace b/test/trace/text-field-set-text-format-7.swf.trace
new file mode 100644
index 0000000..7c04b47
--- /dev/null
+++ b/test/trace/text-field-set-text-format-7.swf.trace
@@ -0,0 +1,139 @@
+Starting state:
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+all, font:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+1, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+-3, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+32, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+3, 6, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=true
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+4, 5, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+-1, 2, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+7, 30, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
+20, 30, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
diff --git a/test/trace/text-field-set-text-format-8.swf b/test/trace/text-field-set-text-format-8.swf
new file mode 100644
index 0000000..8db506a
Binary files /dev/null and b/test/trace/text-field-set-text-format-8.swf differ
diff --git a/test/trace/text-field-set-text-format-8.swf.trace b/test/trace/text-field-set-text-format-8.swf.trace
new file mode 100644
index 0000000..7c04b47
--- /dev/null
+++ b/test/trace/text-field-set-text-format-8.swf.trace
@@ -0,0 +1,139 @@
+Starting state:
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+all, font:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=false
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+1, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+-3, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+32, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=false
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=false
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+3, 6, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=true
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+4, 5, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=false
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+-1, 2, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=false
+8: align=left blockIndent=0 bold=false bullet=false
+9: align=left blockIndent=0 bold=false bullet=false
+10: align=left blockIndent=0 bold=false bullet=false
+11: align=left blockIndent=0 bold=false bullet=false
+7, 30, bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
+20, 30, !bullet:
+undefined
+0: align=right blockIndent=0 bold=false bullet=true
+1: align=right blockIndent=0 bold=true bullet=true
+2: align=right blockIndent=0 bold=true bullet=false
+3: align=right blockIndent=0 bold=true bullet=true
+4: align=right blockIndent=0 bold=true bullet=false
+5: align=right blockIndent=0 bold=true bullet=true
+6: align=right blockIndent=0 bold=false bullet=false
+7: align=left blockIndent=0 bold=false bullet=true
+8: align=left blockIndent=0 bold=false bullet=true
+9: align=left blockIndent=0 bold=false bullet=true
+10: align=left blockIndent=0 bold=false bullet=true
+11: align=left blockIndent=0 bold=false bullet=true
diff --git a/test/trace/text-field-set-text-format.as b/test/trace/text-field-set-text-format.as
new file mode 100644
index 0000000..076c10c
--- /dev/null
+++ b/test/trace/text-field-set-text-format.as
@@ -0,0 +1,95 @@
+// makeswf -v 7 -r 1 -o text-field-get-text-format-7.swf text-field-get-text-format.as
+
+var properties = [
+  "align",
+  "blockIndent",
+  "bold",
+  "bullet"/*,
+  "color",
+  "display",
+  "font",
+  "indent",
+  "italic",
+  "kerning",
+  "leading",
+  "leftMargin",
+  "letterSpacing",
+  "rightMargin",
+  "size",
+  "tabStops",
+  "target",
+  "underline",
+  "url"*/
+];
+
+function format_to_string (fmt) {
+  str = "";
+  for (var i = 0; i < properties.length; i++) {
+    str += " " + properties[i] + "=" + fmt[properties[i]];
+  }
+  return str;
+}
+
+function check () {
+  for (var i = 0; i < t.length; i++) {
+    trace (i + ":" + format_to_string (t.getTextFormat (i)));
+  }
+}
+
+
+this.createTextField ("t", 1, 0, 0, 200, 200);
+
+t.html = true;
+t.htmlText = "<p align='right'>a<b>b<i>c</i>d<u>e</u>f</b>g</p>\rh<font size='20'>i</font>j\r";
+
+var fmt = new TextFormat ();
+
+trace ("Starting state:");
+check ();
+
+trace ("all, font:");
+fmt.font = "A";
+trace (t.setTextFormat (fmt));
+check ();
+
+trace ("1, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (1, fmt));
+check ();
+
+trace ("-3, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (-3, fmt));
+check ();
+
+trace ("32, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (32, fmt));
+check ();
+
+trace ("3, 6, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (3, 6, fmt));
+check ();
+
+trace ("4, 5, !bullet:");
+fmt.bullet = false;
+trace (t.setTextFormat (4, 5, fmt));
+check ();
+
+trace ("-1, 2, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (-1, 2, fmt));
+check ();
+
+trace ("7, 30, bullet:");
+fmt.bullet = true;
+trace (t.setTextFormat (7, 30, fmt));
+check ();
+
+trace ("20, 30, !bullet:");
+fmt.bullet = false;
+trace (t.setTextFormat (20, 30, fmt));
+check ();
+
+loadMovie ("FSCommand:quit", "");
commit 2ea0d2b56719df9332854bf9754f85d29a27e4b1
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 11:06:44 2007 +0300

    Fix index handling of TextField's setTextFormat

diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 38a746a..244c76c 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -992,8 +992,8 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
 {
   SwfdecTextFieldMovie *text;
   SwfdecTextFormat *format;
-  int start_index, end_index;
-  int i;
+  int val, start_index, end_index;
+  guint i;
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
 
@@ -1001,18 +1001,23 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
     return;
 
   i = 0;
-  if (argc >= 2) {
-    start_index = swfdec_as_value_to_integer (cx, &argv[i++]);
-    start_index = CLAMP (start_index, 0, g_utf8_strlen (text->input->str, -1));
-  } else {
+  if (argc <= i + 1) {
     start_index = 0;
-  }
-  if (argc >= 3) {
-    end_index = swfdec_as_value_to_integer (cx, &argv[i++]);
+    end_index = g_utf8_strlen (text->input->str, -1);
+  } else {
+    start_index = val = swfdec_as_value_to_integer (cx, &argv[i++]);
+    start_index = CLAMP (start_index, 0, g_utf8_strlen (text->input->str, -1));
+    if (argc <= i + 1) {
+      if (val < 0) { // fail
+	start_index = end_index = 0;
+      } else{
+	end_index = start_index + 1;
+      }
+    } else {
+      end_index = swfdec_as_value_to_integer (cx, &argv[i++]);
+    }
     end_index =
       CLAMP (end_index, start_index, g_utf8_strlen (text->input->str, -1));
-  } else {
-    end_index = g_utf8_strlen (text->input->str, -1);
   }
   if (start_index == end_index)
     return;
commit 99836faf2e3b8b8b1ea66eb64cafd52effad8a51
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 10:29:03 2007 +0300

    Add a test for TextField's getTextFormat

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 37d6322..8a195c1 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -1859,6 +1859,15 @@ EXTRA_DIST = \
 	targetpath-6.swf.trace \
 	targetpath-7.swf \
 	targetpath-7.swf.trace \
+	text-field-get-text-format.as \
+	text-field-get-text-format-5.swf \
+	text-field-get-text-format-5.swf.trace \
+	text-field-get-text-format-6.swf \
+	text-field-get-text-format-6.swf.trace \
+	text-field-get-text-format-7.swf \
+	text-field-get-text-format-7.swf.trace \
+	text-field-get-text-format-8.swf \
+	text-field-get-text-format-8.swf.trace \
 	text-field-html-input.as \
 	text-field-html-input-6.swf \
 	text-field-html-input-6.swf.trace \
diff --git a/test/trace/text-field-get-text-format-5.swf b/test/trace/text-field-get-text-format-5.swf
new file mode 100644
index 0000000..7cc3b26
Binary files /dev/null and b/test/trace/text-field-get-text-format-5.swf differ
diff --git a/test/trace/text-field-get-text-format-5.swf.trace b/test/trace/text-field-get-text-format-5.swf.trace
new file mode 100644
index 0000000..ac61f1f
--- /dev/null
+++ b/test/trace/text-field-get-text-format-5.swf.trace
@@ -0,0 +1,10 @@
+all: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+-1: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+-1, 5: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+-1, 30: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+0, -1: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+5, 30: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+2, 4, 6: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+5, 4: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+5, 5: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
+30, 35: align= blockIndent= bold= bullet= color= display= font= indent= italic= kerning= leading= leftMargin= letterSpacing= rightMargin= size= tabStops= target= underline= url=
diff --git a/test/trace/text-field-get-text-format-6.swf b/test/trace/text-field-get-text-format-6.swf
new file mode 100644
index 0000000..66604e0
Binary files /dev/null and b/test/trace/text-field-get-text-format-6.swf differ
diff --git a/test/trace/text-field-get-text-format-6.swf.trace b/test/trace/text-field-get-text-format-6.swf.trace
new file mode 100644
index 0000000..6af1d00
--- /dev/null
+++ b/test/trace/text-field-get-text-format-6.swf.trace
@@ -0,0 +1,101 @@
+all: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+0: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+0-1: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+0-2: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+0-3: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+0-4: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+0-5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-6: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+0-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+0-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+1: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+1-2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+1-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+1-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+1-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+1-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+1-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+2-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+2-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+2-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+2-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+2-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+3-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+3-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+3-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+3-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=true url=
+4-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=true url=
+4-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+4-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+4-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+4-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+4-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+4-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+4-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-8: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+5-12: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+6: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+6-7: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+6-8: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+6-9: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+6-10: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+6-11: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+6-12: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+7: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+7-8: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+7-9: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+7-10: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+7-11: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+7-12: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+8: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+8-9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+8-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+8-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+8-12: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+9-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+9-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+9-12: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=20 tabStops= target= underline=false url=
+10-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=20 tabStops= target= underline=false url=
+10-12: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+11-12: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+12: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+-1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning= leading=null leftMargin=null letterSpacing= rightMargin=null size=null tabStops=null target=null underline=null url=null
+-1, 5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=null url=
+-1, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=null url=
+0, -1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning= leading=null leftMargin=null letterSpacing= rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=null tabStops= target= underline=false url=
+2, 4, 6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning= leading=0 leftMargin=0 letterSpacing= rightMargin=0 size=12 tabStops= target= underline=false url=
+5, 4: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning= leading=null leftMargin=null letterSpacing= rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 5: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning= leading=null leftMargin=null letterSpacing= rightMargin=null size=null tabStops=null target=null underline=null url=null
+30, 35: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning= leading=null leftMargin=null letterSpacing= rightMargin=null size=null tabStops=null target=null underline=null url=null
diff --git a/test/trace/text-field-get-text-format-7.swf b/test/trace/text-field-get-text-format-7.swf
new file mode 100644
index 0000000..9542bb5
Binary files /dev/null and b/test/trace/text-field-get-text-format-7.swf differ
diff --git a/test/trace/text-field-get-text-format-7.swf.trace b/test/trace/text-field-get-text-format-7.swf.trace
new file mode 100644
index 0000000..10555ac
--- /dev/null
+++ b/test/trace/text-field-get-text-format-7.swf.trace
@@ -0,0 +1,88 @@
+all: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+0: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+0-1: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+0-2: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+0-3: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+0-4: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+0-5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+0-6: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+0-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+0-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+0-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+0-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+0-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+1: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+1-2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+1-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+1-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+1-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+1-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+1-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+1-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+1-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+1-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+1-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+2-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+2-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+2-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+2-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+2-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+2-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+2-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+2-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+2-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+3-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+3-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+3-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+3-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+3-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+3-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+3-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+3-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=true url=
+4-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=true url=
+4-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+4-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+4-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+4-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+4-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+4-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+5-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+6: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+6-7: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+6-8: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+6-9: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+6-10: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+6-11: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+7: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+7-8: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+7-9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+7-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+7-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+8: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+8-9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+8-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+8-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=20 tabStops= target= underline=false url=
+9-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=20 tabStops= target= underline=false url=
+9-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+10-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+-1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=undefined leading=null leftMargin=null letterSpacing=undefined rightMargin=null size=null tabStops=null target=null underline=null url=null
+-1, 5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=null url=
+-1, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=null url=
+0, -1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=undefined leading=null leftMargin=null letterSpacing=undefined rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=null tabStops= target= underline=false url=
+2, 4, 6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=undefined leading=0 leftMargin=0 letterSpacing=undefined rightMargin=0 size=12 tabStops= target= underline=false url=
+5, 4: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=undefined leading=null leftMargin=null letterSpacing=undefined rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 5: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=undefined leading=null leftMargin=null letterSpacing=undefined rightMargin=null size=null tabStops=null target=null underline=null url=null
+30, 35: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=undefined leading=null leftMargin=null letterSpacing=undefined rightMargin=null size=null tabStops=null target=null underline=null url=null
diff --git a/test/trace/text-field-get-text-format-8.swf b/test/trace/text-field-get-text-format-8.swf
new file mode 100644
index 0000000..27a1268
Binary files /dev/null and b/test/trace/text-field-get-text-format-8.swf differ
diff --git a/test/trace/text-field-get-text-format-8.swf.trace b/test/trace/text-field-get-text-format-8.swf.trace
new file mode 100644
index 0000000..33bea13
--- /dev/null
+++ b/test/trace/text-field-get-text-format-8.swf.trace
@@ -0,0 +1,88 @@
+all: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+0: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+0-1: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+0-2: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+0-3: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+0-4: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+0-5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+0-6: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+0-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+0-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+0-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+0-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+0-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+1: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+1-2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+1-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+1-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+1-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+1-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+1-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+1-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+1-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+1-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+1-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+2: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+2-3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=true kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+2-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+2-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+2-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+2-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+2-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+2-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+2-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+2-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+3: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+3-4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+3-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+3-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+3-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+3-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+3-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+3-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+3-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+4: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=true url=
+4-5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=true url=
+4-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+4-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+4-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+4-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+4-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+4-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+5: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5-6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5-7: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5-8: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5-9: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5-10: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+5-11: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+6: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+6-7: align=right blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+6-8: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+6-9: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+6-10: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+6-11: align=null blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+7: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+7-8: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+7-9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+7-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+7-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+8: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+8-9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+8-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+8-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+9: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=20 tabStops= target= underline=false url=
+9-10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=20 tabStops= target= underline=false url=
+9-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+10: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+10-11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+11: align=left blockIndent=0 bold=false bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+-1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=null leading=null leftMargin=null letterSpacing=null rightMargin=null size=null tabStops=null target=null underline=null url=null
+-1, 5: align=right blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=null url=
+-1, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=null url=
+0, -1: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=null leading=null leftMargin=null letterSpacing=null rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 30: align=null blockIndent=0 bold=null bullet=false color=0 display=block font=Times New Roman indent=0 italic=false kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=null tabStops= target= underline=false url=
+2, 4, 6: align=right blockIndent=0 bold=true bullet=false color=0 display=block font=Times New Roman indent=0 italic=null kerning=false leading=0 leftMargin=0 letterSpacing=0 rightMargin=0 size=12 tabStops= target= underline=false url=
+5, 4: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=null leading=null leftMargin=null letterSpacing=null rightMargin=null size=null tabStops=null target=null underline=null url=null
+5, 5: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=null leading=null leftMargin=null letterSpacing=null rightMargin=null size=null tabStops=null target=null underline=null url=null
+30, 35: align=null blockIndent=null bold=null bullet=null color=null display=block font=null indent=null italic=null kerning=null leading=null leftMargin=null letterSpacing=null rightMargin=null size=null tabStops=null target=null underline=null url=null
diff --git a/test/trace/text-field-get-text-format.as b/test/trace/text-field-get-text-format.as
new file mode 100644
index 0000000..f139750
--- /dev/null
+++ b/test/trace/text-field-get-text-format.as
@@ -0,0 +1,58 @@
+// makeswf -v 7 -r 1 -o text-field-get-text-format-7.swf text-field-get-text-format.as
+
+var properties = [
+  "align",
+  "blockIndent",
+  "bold",
+  "bullet",
+  "color",
+  "display",
+  "font",
+  "indent",
+  "italic",
+  "kerning",
+  "leading",
+  "leftMargin",
+  "letterSpacing",
+  "rightMargin",
+  "size",
+  "tabStops",
+  "target",
+  "underline",
+  "url"
+];
+
+function format_to_string (fmt) {
+  str = "";
+  for (var i = 0; i < properties.length; i++) {
+    str += " " + properties[i] + "=" + fmt[properties[i]];
+  }
+  return str;
+}
+
+this.createTextField ("t", 1, 0, 0, 200, 200);
+
+t.html = true;
+t.htmlText = "<p align='right'>a<b>b<i>c</i>d<u>e</u>f</b>g</p>\rh<font size='20'>i</font>j\r";
+
+// normal
+trace ("all:" + format_to_string (t.getTextFormat ()));
+for (var i = 0; i < t.length; i++) {
+  trace (i + ":" + format_to_string (t.getTextFormat (i)));
+  for (var j = i + 1; j < t.length; j++) {
+    trace (i + "-" + j + ":" + format_to_string (t.getTextFormat (i, j)));
+  }
+}
+
+// special cases
+trace ("-1:" + format_to_string (t.getTextFormat (-1)));
+trace ("-1, 5:" + format_to_string (t.getTextFormat (-1, 5)));
+trace ("-1, 30:" + format_to_string (t.getTextFormat (-1, 30)));
+trace ("0, -1:" + format_to_string (t.getTextFormat (0, -1)));
+trace ("5, 30:" + format_to_string (t.getTextFormat (5, 30)));
+trace ("2, 4, 6:" + format_to_string (t.getTextFormat (2, 4, 6)));
+trace ("5, 4:" + format_to_string (t.getTextFormat (5, 4)));
+trace ("5, 5:" + format_to_string (t.getTextFormat (5, 5)));
+trace ("30, 35:" + format_to_string (t.getTextFormat (30, 35)));
+
+loadMovie ("FSCommand:quit", "");
commit bb557c4c675940a50143893908d3bc6196ff3e78
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 10:27:17 2007 +0300

    Fixes to getTextFormat's index handling

diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index d8d7917..38a746a 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -1035,7 +1035,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
 {
   SwfdecTextFieldMovie *text;
   SwfdecTextFormat *format;
-  guint start_index, end_index;
+  int val, start_index, end_index;
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
 
@@ -1043,15 +1043,19 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
     start_index = 0;
     end_index = g_utf8_strlen (text->input->str, -1);
   } else {
-    start_index = swfdec_as_value_to_integer (cx, &argv[0]);
-    start_index = MIN (start_index, g_utf8_strlen (text->input->str, -1));
+    start_index = val = swfdec_as_value_to_integer (cx, &argv[0]);
+    start_index = CLAMP (start_index, 0, g_utf8_strlen (text->input->str, -1));
     if (argc == 1) {
-      end_index = start_index + 1;
+      if (val < 0) { // fail
+	start_index = end_index = 0;
+      } else{
+	end_index = start_index + 1;
+      }
     } else {
       end_index = swfdec_as_value_to_integer (cx, &argv[1]);
-      end_index =
-	CLAMP (end_index, start_index, g_utf8_strlen (text->input->str, -1));
     }
+    end_index =
+      CLAMP (end_index, start_index, g_utf8_strlen (text->input->str, -1));
   }
 
   if (start_index == end_index) {
commit ebff9e03844893964b51f67e75bf11e7d1834db5
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 10:14:57 2007 +0300

    Fix an error in swfdec_text_format_remove_different (broke getTextFormat)

diff --git a/libswfdec/swfdec_text_format.c b/libswfdec/swfdec_text_format.c
index f3993f5..4fe215e 100644
--- a/libswfdec/swfdec_text_format.c
+++ b/libswfdec/swfdec_text_format.c
@@ -934,10 +934,10 @@ swfdec_text_format_remove_different (SwfdecTextFormat *format,
   set = format->values_set & from->values_set;
 
   if (set & (1 << PROP_ALIGN) && format->align != from->align)
-    set &= ~PROP_ALIGN;
+    set &= ~(1 << PROP_ALIGN);
   if (set & (1 << PROP_BLOCK_INDENT) &&
       format->block_indent != from->block_indent) {
-    set &= ~PROP_BLOCK_INDENT;
+    set &= ~(1 << PROP_BLOCK_INDENT);
   }
   if (set & (1 << PROP_BOLD) && format->bold != from->bold)
     set &= ~(1 << PROP_BOLD);
commit 2b5971776d99344ca70b896fb101dd9998e65675
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 10:05:18 2007 +0300

    Fix an error in TextField's getTextFormat when end_index was <= start_index

diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 9229992..d8d7917 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -1054,8 +1054,12 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
     }
   }
 
-  format =
-    swfdec_text_field_movie_get_text_format (text, start_index, end_index);
+  if (start_index == end_index) {
+    format = SWFDEC_TEXT_FORMAT (swfdec_text_format_new (cx));
+  } else {
+    format =
+      swfdec_text_field_movie_get_text_format (text, start_index, end_index);
+  }
 
   SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (format));
 }
commit 48de0d5c1cd7c62cadbd1a23ed83debe1f3c0d56
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 00:29:21 2007 +0300

    Add a test case to see when XMLNode's native properties are initialized

diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 6b39368..37d6322 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -2041,6 +2041,15 @@ EXTRA_DIST = \
 	xml-node-6.swf.trace \
 	xml-node-7.swf \
 	xml-node-7.swf.trace \
+	xml-node-init.as \
+	xml-node-init-5.swf \
+	xml-node-init-5.swf.trace \
+	xml-node-init-6.swf \
+	xml-node-init-6.swf.trace \
+	xml-node-init-7.swf \
+	xml-node-init-7.swf.trace \
+	xml-node-init-8.swf \
+	xml-node-init-8.swf.trace \
 	xml-other.as \
 	xml-other-5.swf \
 	xml-other-5.swf.trace \
diff --git a/test/trace/xml-node-init-5.swf b/test/trace/xml-node-init-5.swf
new file mode 100644
index 0000000..4591a5a
Binary files /dev/null and b/test/trace/xml-node-init-5.swf differ
diff --git a/test/trace/xml-node-init-5.swf.trace b/test/trace/xml-node-init-5.swf.trace
new file mode 100644
index 0000000..0dc4ec2
--- /dev/null
+++ b/test/trace/xml-node-init-5.swf.trace
@@ -0,0 +1,11 @@
+Check when XMLNode's native properties are initialized
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/xml-node-init-6.swf b/test/trace/xml-node-init-6.swf
new file mode 100644
index 0000000..70179ed
Binary files /dev/null and b/test/trace/xml-node-init-6.swf differ
diff --git a/test/trace/xml-node-init-6.swf.trace b/test/trace/xml-node-init-6.swf.trace
new file mode 100644
index 0000000..2dfc302
--- /dev/null
+++ b/test/trace/xml-node-init-6.swf.trace
@@ -0,0 +1,11 @@
+Check when XMLNode's native properties are initialized
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/xml-node-init-7.swf b/test/trace/xml-node-init-7.swf
new file mode 100644
index 0000000..1d7401d
Binary files /dev/null and b/test/trace/xml-node-init-7.swf differ
diff --git a/test/trace/xml-node-init-7.swf.trace b/test/trace/xml-node-init-7.swf.trace
new file mode 100644
index 0000000..2dfc302
--- /dev/null
+++ b/test/trace/xml-node-init-7.swf.trace
@@ -0,0 +1,11 @@
+Check when XMLNode's native properties are initialized
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/xml-node-init-8.swf b/test/trace/xml-node-init-8.swf
new file mode 100644
index 0000000..dd5f6a1
Binary files /dev/null and b/test/trace/xml-node-init-8.swf differ
diff --git a/test/trace/xml-node-init-8.swf.trace b/test/trace/xml-node-init-8.swf.trace
new file mode 100644
index 0000000..2dfc302
--- /dev/null
+++ b/test/trace/xml-node-init-8.swf.trace
@@ -0,0 +1,11 @@
+Check when XMLNode's native properties are initialized
+true
+true
+false
+false
+false
+false
+false
+false
+true
+true
diff --git a/test/trace/xml-node-init.as b/test/trace/xml-node-init.as
new file mode 100644
index 0000000..9e959f8
--- /dev/null
+++ b/test/trace/xml-node-init.as
@@ -0,0 +1,34 @@
+// makeswf -v 7 -r 1 -o xml-node-init-7.swf xml-node-init.as
+
+function check_and_reset () {
+  _global.XMLNode.prototype.hasOwnProperty = ASnative (101, 5);
+  trace (_global.XMLNode.prototype.hasOwnProperty ("nodeType"));
+  _global.XMLNode.prototype = new Object ();
+}
+
+trace ("Check when XMLNode's native properties are initialized");
+
+check_and_reset ();
+var tmp = new XMLNode (1, "test");
+check_and_reset ();
+
+tmp = new XMLNode ();
+check_and_reset ();
+tmp = new XMLNode (1);
+check_and_reset ();
+tmp = new XMLNode (1, undefined);
+check_and_reset ();
+tmp = new XMLNode (undefined, "test");
+check_and_reset ();
+
+XMLNode (1, "test");
+check_and_reset ();
+
+var x = new XML ("<test/>test");
+check_and_reset ();
+x.createTextNode ("test");
+check_and_reset ();
+x.createElement ("test");
+check_and_reset ();
+
+loadMovie ("FSCommand:quit", "");
commit 9b1681c91b413f054d54198ddb4446c6884ff287
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 00:25:01 2007 +0300

    Don't init XMLNode's properties when create XMLNodes from parsed XML

diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index ea2f287..f447e46 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -560,8 +560,8 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p)
 
   // create the new element
   if (!close) {
-    child = swfdec_xml_node_new (SWFDEC_AS_OBJECT (*node)->context,
-	SWFDEC_XML_NODE_ELEMENT, name);
+    child = swfdec_xml_node_new_no_properties (
+	SWFDEC_AS_OBJECT (*node)->context, SWFDEC_XML_NODE_ELEMENT, name);
     g_free (name);
   }
 
@@ -640,8 +640,8 @@ swfdec_xml_parse_text (SwfdecXml *xml, SwfdecXmlNode *node,
     text = g_strndup (p, end - p);
     unescaped = swfdec_xml_unescape (SWFDEC_AS_OBJECT (xml)->context, text);
     g_free (text);
-    child = swfdec_xml_node_new (SWFDEC_AS_OBJECT (node)->context,
-	SWFDEC_XML_NODE_TEXT, unescaped);
+    child = swfdec_xml_node_new_no_properties (
+	SWFDEC_AS_OBJECT (node)->context, SWFDEC_XML_NODE_TEXT, unescaped);
     g_free (unescaped);
     swfdec_xml_node_appendChild (node, child);
   }
diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c
index 79c6952..457cd6b 100644
--- a/libswfdec/swfdec_xml_node.c
+++ b/libswfdec/swfdec_xml_node.c
@@ -1021,14 +1021,15 @@ swfdec_xml_node_init_properties (SwfdecAsContext *cx)
 }
 
 SwfdecXmlNode *
-swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
-    const char* value)
+swfdec_xml_node_new_no_properties (SwfdecAsContext *context,
+    SwfdecXmlNodeType type, const char* value)
 {
   SwfdecAsValue val;
   SwfdecXmlNode *node;
   guint size;
 
   g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL);
+  g_return_val_if_fail (value != NULL, NULL);
 
   size = sizeof (SwfdecXmlNode);
   if (!swfdec_as_context_use_mem (context, size))
@@ -1040,14 +1041,23 @@ swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
     return NULL;
   swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (node), SWFDEC_AS_VALUE_GET_OBJECT (&val));
 
-  swfdec_xml_node_init_properties (context);
-
   swfdec_xml_node_init_values (node, type,
       swfdec_as_context_get_string (SWFDEC_AS_OBJECT (node)->context, value));
 
   return node;
 }
 
+SwfdecXmlNode *
+swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
+    const char* value)
+{
+  g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL);
+
+  swfdec_xml_node_init_properties (context);
+
+  return swfdec_xml_node_new_no_properties (context, type, value);
+}
+
 SWFDEC_AS_CONSTRUCTOR (253, 0, swfdec_xml_node_construct, swfdec_xml_node_get_type)
 void
 swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
diff --git a/libswfdec/swfdec_xml_node.h b/libswfdec/swfdec_xml_node.h
index e40b7cd..07c721c 100644
--- a/libswfdec/swfdec_xml_node.h
+++ b/libswfdec/swfdec_xml_node.h
@@ -83,6 +83,9 @@ GType		swfdec_xml_node_get_type	(void);
 SwfdecXmlNode *	swfdec_xml_node_new		(SwfdecAsContext *	context,
 						 SwfdecXmlNodeType	type,
 						 const char *		value);
+SwfdecXmlNode *	swfdec_xml_node_new_no_properties (SwfdecAsContext *	context,
+						 SwfdecXmlNodeType	type,
+						 const char *		value);
 void		swfdec_xml_node_removeNode	(SwfdecXmlNode *	node);
 void		swfdec_xml_node_appendChild	(SwfdecXmlNode *	node,
 						 SwfdecXmlNode *	child);
commit 1cce43e9651095853b5ec127505d35ae5f109cbe
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Thu Oct 25 00:14:36 2007 +0300

    Create XMLNode's properties also when created through an XML object
    
    Remove SWFDEC_FIXME from swfdec_xml_node_construct when not constructing, it's
    supposed to do nothing

diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c
index 545c8d2..79c6952 100644
--- a/libswfdec/swfdec_xml_node.c
+++ b/libswfdec/swfdec_xml_node.c
@@ -1040,6 +1040,8 @@ swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
     return NULL;
   swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (node), SWFDEC_AS_VALUE_GET_OBJECT (&val));
 
+  swfdec_xml_node_init_properties (context);
+
   swfdec_xml_node_init_values (node, type,
       swfdec_as_context_get_string (SWFDEC_AS_OBJECT (node)->context, value));
 
@@ -1051,10 +1053,8 @@ void
 swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
     guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
 {
-  if (!swfdec_as_context_is_constructing (cx)) {
-    SWFDEC_FIXME ("What do we do if not constructing?");
+  if (!swfdec_as_context_is_constructing (cx))
     return;
-  }
 
   g_assert (SWFDEC_IS_XML_NODE (object));
 
commit 76e1c9e15ed4c4e55bc470c42ca595f095a298de
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Wed Oct 24 19:35:15 2007 +0300

    Add FIXME comments about native property initialization weirdness

diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 6e953a4..9229992 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -1236,6 +1236,10 @@ swfdec_text_field_movie_init_properties (SwfdecAsContext *cx)
   SwfdecAsValue val;
   SwfdecAsObject *object, *proto;
 
+  // FIXME: We should only initialize if the prototype Object has not been
+  // initialized by any object's constructor with native properties
+  // (TextField, TextFormat, XML, XMLNode at least)
+
   g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx));
 
   swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_TextField, &val);
diff --git a/libswfdec/swfdec_text_format.c b/libswfdec/swfdec_text_format.c
index d103020..f3993f5 100644
--- a/libswfdec/swfdec_text_format.c
+++ b/libswfdec/swfdec_text_format.c
@@ -1101,6 +1101,10 @@ swfdec_text_format_init_properties (SwfdecAsContext *cx)
   SwfdecAsValue val;
   SwfdecAsObject *proto;
 
+  // FIXME: We should only initialize if the prototype Object has not been
+  // initialized by any object's constructor with native properties
+  // (TextField, TextFormat, XML, XMLNode at least)
+
   g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx));
 
   swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_TextFormat, &val);
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index c21409c..ea2f287 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -760,6 +760,12 @@ swfdec_xml_init_properties (SwfdecAsContext *cx)
   SwfdecAsValue val;
   SwfdecAsObject *xml, *proto;
 
+  // FIXME: We should only initialize if the prototype Object has not been
+  // initialized by any object's constructor with native properties
+  // (TextField, TextFormat, XML, XMLNode at least)
+
+  g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx));
+
   swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XML, &val);
   if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
     return;
diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c
index 617dbc1..545c8d2 100644
--- a/libswfdec/swfdec_xml_node.c
+++ b/libswfdec/swfdec_xml_node.c
@@ -976,6 +976,12 @@ swfdec_xml_node_init_properties (SwfdecAsContext *cx)
   SwfdecAsValue val;
   SwfdecAsObject *node, *proto;
 
+  // FIXME: We should only initialize if the prototype Object has not been
+  // initialized by any object's constructor with native properties
+  // (TextField, TextFormat, XML, XMLNode at least)
+
+  g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx));
+
   swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XMLNode, &val);
   if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
     return;
commit 8e00c17b38fe8aad3159f88ab30c5cc2673df1e2
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Wed Oct 24 19:25:13 2007 +0300

    Make  XML's and XMLNode's native property initialization work like TextFormat's

diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h
index 3baa77f..894acad 100644
--- a/libswfdec/swfdec_player_internal.h
+++ b/libswfdec/swfdec_player_internal.h
@@ -75,8 +75,6 @@ struct _SwfdecPlayer
   double		scale_y;		/* cached y scale value */
   int			offset_x;		/* x offset from top left edge after scaling */
   int			offset_y;		/* y offset from top left edge after scaling */
-  gboolean		xml_properties_initialized; /* whether XML object's native properties have been initialized */
-  gboolean		xml_node_properties_initialized; /* same for XMLNode */
 
   guint			unnamed_count;		/* variable used for naming unnamed movies */
   /* ActionScript */
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index 739abca..c21409c 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -754,6 +754,37 @@ swfdec_xml_createTextNode (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (node));
 }
 
+static void
+swfdec_xml_init_properties (SwfdecAsContext *cx)
+{
+  SwfdecAsValue val;
+  SwfdecAsObject *xml, *proto;
+
+  swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XML, &val);
+  if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
+    return;
+  xml = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+
+  swfdec_as_object_get_variable (xml, SWFDEC_AS_STR_prototype, &val);
+  if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
+    return;
+  proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_ignoreWhite,
+      swfdec_xml_get_ignoreWhite, swfdec_xml_set_ignoreWhite);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_status,
+      swfdec_xml_get_status, swfdec_xml_set_status);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_xmlDecl,
+      swfdec_xml_get_xmlDecl, swfdec_xml_set_xmlDecl);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_docTypeDecl,
+      swfdec_xml_get_docTypeDecl, swfdec_xml_set_docTypeDecl);
+
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_contentType,
+      swfdec_xml_get_contentType, swfdec_xml_set_contentType);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_loaded,
+      swfdec_xml_get_loaded, swfdec_xml_set_loaded);
+}
+
 SWFDEC_AS_CONSTRUCTOR (253, 9, swfdec_xml_construct, swfdec_xml_get_type)
 void
 swfdec_xml_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
@@ -766,32 +797,9 @@ swfdec_xml_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   g_assert (SWFDEC_IS_XML (object));
 
-  if (!SWFDEC_PLAYER (cx)->xml_properties_initialized) {
-    SwfdecAsValue val;
-    SwfdecAsObject *proto;
-
-    swfdec_as_object_get_variable (object, SWFDEC_AS_STR___proto__, &val);
-    g_return_if_fail (SWFDEC_AS_VALUE_IS_OBJECT (&val));
-    proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
-
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_ignoreWhite,
-	swfdec_xml_get_ignoreWhite, swfdec_xml_set_ignoreWhite);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_status,
-	swfdec_xml_get_status, swfdec_xml_set_status);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_xmlDecl,
-	swfdec_xml_get_xmlDecl, swfdec_xml_set_xmlDecl);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_docTypeDecl,
-	swfdec_xml_get_docTypeDecl, swfdec_xml_set_docTypeDecl);
-
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_contentType,
-	swfdec_xml_get_contentType, swfdec_xml_set_contentType);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_loaded,
-	swfdec_xml_get_loaded, swfdec_xml_set_loaded);
-
-    SWFDEC_PLAYER (cx)->xml_properties_initialized = TRUE;
-  }
+  swfdec_xml_init_properties (cx);
 
-  swfdec_xml_node_init_properties (SWFDEC_XML_NODE (object),
+  swfdec_xml_node_init_values (SWFDEC_XML_NODE (object),
       SWFDEC_XML_NODE_ELEMENT, SWFDEC_AS_STR_EMPTY);
 
   SWFDEC_AS_VALUE_SET_STRING (&SWFDEC_XML (object)->contentType,
diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c
index 7d59d9e..617dbc1 100644
--- a/libswfdec/swfdec_xml_node.c
+++ b/libswfdec/swfdec_xml_node.c
@@ -970,6 +970,50 @@ swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value)
   node->childNodes = SWFDEC_AS_ARRAY (swfdec_as_array_new (object->context));
 }
 
+static void
+swfdec_xml_node_init_properties (SwfdecAsContext *cx)
+{
+  SwfdecAsValue val;
+  SwfdecAsObject *node, *proto;
+
+  swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XMLNode, &val);
+  if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
+    return;
+  node = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+
+  swfdec_as_object_get_variable (node, SWFDEC_AS_STR_prototype, &val);
+  if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
+    return;
+  proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeType,
+      swfdec_xml_node_get_nodeType, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeValue,
+      swfdec_xml_node_get_nodeValue, swfdec_xml_node_set_nodeValue);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeName,
+      swfdec_xml_node_get_nodeName, swfdec_xml_node_set_nodeName);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_prefix,
+      swfdec_xml_node_do_get_prefix, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_localName,
+      swfdec_xml_node_get_localName, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_namespaceURI,
+      swfdec_xml_node_get_namespaceURI, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_attributes,
+      swfdec_xml_node_get_attributes, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_parentNode,
+      swfdec_xml_node_get_parentNode, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_previousSibling,
+      swfdec_xml_node_get_previousSibling, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nextSibling,
+      swfdec_xml_node_get_nextSibling, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_firstChild,
+      swfdec_xml_node_get_firstChild, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_lastChild,
+      swfdec_xml_node_get_lastChild, NULL);
+  swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_childNodes,
+      swfdec_xml_node_get_childNodes, NULL);
+}
+
 SwfdecXmlNode *
 swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
     const char* value)
@@ -1008,44 +1052,6 @@ swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   g_assert (SWFDEC_IS_XML_NODE (object));
 
-  if (!SWFDEC_PLAYER (cx)->xml_node_properties_initialized) {
-    SwfdecAsValue val;
-    SwfdecAsObject *proto;
-
-    swfdec_as_object_get_variable (object, SWFDEC_AS_STR___proto__, &val);
-    g_return_if_fail (SWFDEC_AS_VALUE_IS_OBJECT (&val));
-    proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
-
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeType,
-	swfdec_xml_node_get_nodeType, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeValue,
-	swfdec_xml_node_get_nodeValue, swfdec_xml_node_set_nodeValue);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeName,
-	swfdec_xml_node_get_nodeName, swfdec_xml_node_set_nodeName);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_prefix,
-	swfdec_xml_node_do_get_prefix, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_localName,
-	swfdec_xml_node_get_localName, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_namespaceURI,
-	swfdec_xml_node_get_namespaceURI, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_attributes,
-	swfdec_xml_node_get_attributes, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_parentNode,
-	swfdec_xml_node_get_parentNode, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_previousSibling,
-	swfdec_xml_node_get_previousSibling, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nextSibling,
-	swfdec_xml_node_get_nextSibling, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_firstChild,
-	swfdec_xml_node_get_firstChild, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_lastChild,
-	swfdec_xml_node_get_lastChild, NULL);
-    swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_childNodes,
-	swfdec_xml_node_get_childNodes, NULL);
-
-    SWFDEC_PLAYER (cx)->xml_node_properties_initialized = TRUE;
-  }
-
   if (argc < 2)
     return;
 
@@ -1054,6 +1060,8 @@ swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
       SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1]))
     return;
 
+  swfdec_xml_node_init_properties (cx);
+
   swfdec_xml_node_init_values (SWFDEC_XML_NODE (object),
       swfdec_as_value_to_integer (cx, &argv[0]),
       swfdec_as_value_to_string (cx, &argv[1]));
commit 2d31f9e051466b7d3c97792b0892b0bdb4a01281
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Wed Oct 24 19:18:01 2007 +0300

    Forgot to change the header

diff --git a/libswfdec/swfdec_xml_node.h b/libswfdec/swfdec_xml_node.h
index 6009457..e40b7cd 100644
--- a/libswfdec/swfdec_xml_node.h
+++ b/libswfdec/swfdec_xml_node.h
@@ -87,7 +87,7 @@ void		swfdec_xml_node_removeNode	(SwfdecXmlNode *	node);
 void		swfdec_xml_node_appendChild	(SwfdecXmlNode *	node,
 						 SwfdecXmlNode *	child);
 void		swfdec_xml_node_removeChildren	(SwfdecXmlNode *	node);
-void		swfdec_xml_node_init_properties	(SwfdecXmlNode *	node,
+void		swfdec_xml_node_init_values	(SwfdecXmlNode *	node,
 						 int			type,
 						 const char *		value);
 gint32		swfdec_xml_node_num_children	(SwfdecXmlNode *	node);
commit c266f99aee7b34534b4efd958b5543264982cf1c
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Wed Oct 24 19:11:05 2007 +0300

    Rename swfdec_xml_node_init_properties to _values. Remove old FIXME comment

diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c
index e937429..7d59d9e 100644
--- a/libswfdec/swfdec_xml_node.c
+++ b/libswfdec/swfdec_xml_node.c
@@ -947,8 +947,7 @@ swfdec_xml_node_do_toString (SwfdecAsContext *cx, SwfdecAsObject *object,
 }
 
 void
-swfdec_xml_node_init_properties (SwfdecXmlNode *node, int type,
-    const char* value)
+swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value)
 {
   SwfdecAsObject *object;
 
@@ -959,7 +958,6 @@ swfdec_xml_node_init_properties (SwfdecXmlNode *node, int type,
 
   node->valid = TRUE;
   node->parent = NULL;
-  // FIXME: use _global.Array constructor?
   node->children = SWFDEC_AS_ARRAY (swfdec_as_array_new (object->context));
   node->attributes = swfdec_as_object_new_empty (object->context);
   node->type = type;
@@ -992,7 +990,7 @@ swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type,
     return NULL;
   swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (node), SWFDEC_AS_VALUE_GET_OBJECT (&val));
 
-  swfdec_xml_node_init_properties (node, type,
+  swfdec_xml_node_init_values (node, type,
       swfdec_as_context_get_string (SWFDEC_AS_OBJECT (node)->context, value));
 
   return node;
@@ -1056,7 +1054,7 @@ swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
       SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1]))
     return;
 
-  swfdec_xml_node_init_properties (SWFDEC_XML_NODE (object),
+  swfdec_xml_node_init_values (SWFDEC_XML_NODE (object),
       swfdec_as_value_to_integer (cx, &argv[0]),
       swfdec_as_value_to_string (cx, &argv[1]));
 
commit 28736ea95b50a9085b1f549d4b191d719ba296d7
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date:   Wed Oct 24 19:07:24 2007 +0300

    Make text-field-scroll test not depend on having Times New Roman font

diff --git a/test/trace/text-field-scroll-5.swf b/test/trace/text-field-scroll-5.swf
index 2798fa9..578d1fe 100644
Binary files a/test/trace/text-field-scroll-5.swf and b/test/trace/text-field-scroll-5.swf differ
diff --git a/test/trace/text-field-scroll-5.swf.trace b/test/trace/text-field-scroll-5.swf.trace
index 91239a2..4d134cd 100644
--- a/test/trace/text-field-scroll-5.swf.trace
+++ b/test/trace/text-field-scroll-5.swf.trace
@@ -1,54 +1,54 @@
 # EMPTY
 bottomScroll: 
 hscroll: 
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 
 # WITH TEXT
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITH WORD WRAP
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITHOUT WORD WRAP
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITH WORD WRAP - SCROLL RESET
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITH WORD WRAP - FORMAT RESET
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITH WORD WRAP - TEXT RESET
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 3
 # WITHOUT WORD WRAP - FORMAT RESET
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 30
 # WITHOUT WORD WRAP - TEXT RESET
 bottomScroll: 
 hscroll: 200
-maxhscroll: 
+maxhscroll > 0: false
 maxscroll: 
 scroll: 30
diff --git a/test/trace/text-field-scroll-6.swf b/test/trace/text-field-scroll-6.swf
index 6fc812f..8b0b513 100644
Binary files a/test/trace/text-field-scroll-6.swf and b/test/trace/text-field-scroll-6.swf differ
diff --git a/test/trace/text-field-scroll-6.swf.trace b/test/trace/text-field-scroll-6.swf.trace
index f70c3a5..73460cd 100644
--- a/test/trace/text-field-scroll-6.swf.trace
+++ b/test/trace/text-field-scroll-6.swf.trace
@@ -1,48 +1,48 @@
 # EMPTY
 bottomScroll: 1
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 1
 scroll: 1
 # WITH TEXT
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITHOUT WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - SCROLL RESET
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - TEXT RESET
 bottomScroll: 8
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 79
 scroll: 3
 # WITHOUT WORD WRAP - FORMAT RESET
 bottomScroll: 30
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 30
 # WITHOUT WORD WRAP - TEXT RESET
 bottomScroll: 16
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 11
diff --git a/test/trace/text-field-scroll-7.swf b/test/trace/text-field-scroll-7.swf
index b36d45b..67c1847 100644
Binary files a/test/trace/text-field-scroll-7.swf and b/test/trace/text-field-scroll-7.swf differ
diff --git a/test/trace/text-field-scroll-7.swf.trace b/test/trace/text-field-scroll-7.swf.trace
index 903af5c..38002d0 100644
--- a/test/trace/text-field-scroll-7.swf.trace
+++ b/test/trace/text-field-scroll-7.swf.trace
@@ -1,54 +1,54 @@
 # EMPTY
 bottomScroll: 1
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 1
 scroll: 1
 # WITH TEXT
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITHOUT WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - SCROLL RESET
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - FORMAT RESET
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 79
 scroll: 3
 # WITH WORD WRAP - TEXT RESET
 bottomScroll: 8
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 79
 scroll: 3
 # WITHOUT WORD WRAP - FORMAT RESET
 bottomScroll: 30
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 30
 # WITHOUT WORD WRAP - TEXT RESET
 bottomScroll: 16
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 11
diff --git a/test/trace/text-field-scroll-8.swf b/test/trace/text-field-scroll-8.swf
index 964bd2a..4b1656e 100644
Binary files a/test/trace/text-field-scroll-8.swf and b/test/trace/text-field-scroll-8.swf differ
diff --git a/test/trace/text-field-scroll-8.swf.trace b/test/trace/text-field-scroll-8.swf.trace
index 903af5c..38002d0 100644
--- a/test/trace/text-field-scroll-8.swf.trace
+++ b/test/trace/text-field-scroll-8.swf.trace
@@ -1,54 +1,54 @@
 # EMPTY
 bottomScroll: 1
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 1
 scroll: 1
 # WITH TEXT
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITHOUT WORD WRAP
 bottomScroll: 8
 hscroll: 200
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - SCROLL RESET
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 11
 scroll: 3
 # WITH WORD WRAP - FORMAT RESET
 bottomScroll: 8
 hscroll: 200
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 79
 scroll: 3
 # WITH WORD WRAP - TEXT RESET
 bottomScroll: 8
 hscroll: 0
-maxhscroll: 0
+maxhscroll > 0: false
 maxscroll: 79
 scroll: 3
 # WITHOUT WORD WRAP - FORMAT RESET
 bottomScroll: 30
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 30
 # WITHOUT WORD WRAP - TEXT RESET
 bottomScroll: 16
 hscroll: 0
-maxhscroll: ~500
+maxhscroll > 0: true
 maxscroll: 11
 scroll: 11
diff --git a/test/trace/text-field-scroll.as b/test/trace/text-field-scroll.as
index 78e65f5..bd60a7d 100644
--- a/test/trace/text-field-scroll.as
+++ b/test/trace/text-field-scroll.as
@@ -3,11 +3,7 @@
 function trace_scroll_properties () {
   trace ("bottomScroll: " + t.bottomScroll);
   trace ("hscroll: " + t.hscroll);
-  if (t.maxhscroll > 100) {
-    trace ("maxhscroll: ~" + (t.maxhscroll - t.maxhscroll % 100));
-  } else {
-    trace ("maxhscroll: " + t.maxhscroll);
-  }
+  trace ("maxhscroll > 0: " + (t.maxhscroll > 0));
   trace ("maxscroll: " + t.maxscroll);
   trace ("scroll: " + t.scroll);
 }


More information about the Swfdec mailing list