forked from ruffle-rs/ruffle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avm2: Implement XML.setName (ruffle-rs#12979)
* avm2/tests: Implement XML.setName; add a test * avm2: Basic support for QNames in XML.setName (no namespace support yet) * avm2: Reorder order of Attribute/Element/PI checks in XML.setName * avm2: Throw error ruffle-rs#1117 when the name passed to XML.setName is not a valid XML name
- Loading branch information
1 parent
0e507e8
commit 20db9f8
Showing
9 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package { | ||
import flash.display.MovieClip; | ||
|
||
public class Test extends MovieClip { | ||
public function Test() { | ||
var a:XML = <outer attrib="value"><inner>innerText</inner></outer>; | ||
var b:XML = new XML("justText"); | ||
trace(a.toXMLString()); | ||
a.setName("newOuterName"); | ||
trace(a.toXMLString()); | ||
a.setName(new QName(null,"someOuterName")); | ||
trace(a.toXMLString()); | ||
a.setName(new QName("","otherOuterName")); | ||
trace(a.toXMLString()); | ||
a.@attrib.setName("newattribname"); | ||
trace(a.toXMLString()); | ||
trace(b.toXMLString()); | ||
b.setName("noeffect"); | ||
trace(b.toXMLString()); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<outer attrib="value"> | ||
<inner>innerText</inner> | ||
</outer> | ||
<newOuterName attrib="value"> | ||
<inner>innerText</inner> | ||
</newOuterName> | ||
<someOuterName attrib="value"> | ||
<inner>innerText</inner> | ||
</someOuterName> | ||
<otherOuterName attrib="value"> | ||
<inner>innerText</inner> | ||
</otherOuterName> | ||
<otherOuterName newattribname="value"> | ||
<inner>innerText</inner> | ||
</otherOuterName> | ||
justText | ||
justText |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
num_ticks = 1 | ||
known_failure = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
num_ticks = 1 | ||
known_failure = true |