Skip to content

avm2: Limited XML namespace support #12540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Conversation

evilpie
Copy link
Collaborator

@evilpie evilpie commented Aug 3, 2023

This fixes #10293 and #10639.

Probably also needs some manual testing to make sure we aren't regressing games that use XML and currently work.

@evilpie
Copy link
Collaborator Author

evilpie commented Aug 4, 2023

This almost passes from_avmplus/e4x/Expressions/e11_1_1/, but there is some unrelated issue with:

q = new QName(n, "attr1");
q2 = new QName(q, "attr1");

I need to figure out how to run all skipped tests and find out new failing and passing tests.

@evilpie evilpie force-pushed the xml-namespace branch 2 times, most recently from dd5990b to 1b9613d Compare August 4, 2023 18:45
@evilpie evilpie marked this pull request as ready for review August 4, 2023 18:46
@torokati44
Copy link
Member

I need to figure out how to run all skipped tests and find out new failing and passing tests.

Uh, don't we have a magic command for that?

@Dinnerbone
Copy link
Contributor

I need to figure out how to run all skipped tests and find out new failing and passing tests.

It's automatic, if any test suddenly starts working it'll come up as "failing" and tell you to remove the known_failure flag.

No new tests pass because of this PR, sorry!

@n0samu
Copy link
Member

n0samu commented Aug 5, 2023

This also makes Neopets Lost City Lanes playable!

@evilpie
Copy link
Collaborator Author

evilpie commented Aug 5, 2023

Good to know that we still make sure "failing" tests don't suddenly start working.

What I actually meant was that I would be interested in basically the individual changes inside a test. For example for e11_1_1 the output changed quite a lot, because a lot more asserts now pass.

@Dinnerbone
Copy link
Contributor

What I actually meant was that I would be interested in basically the individual changes inside a test. For example for e11_1_1 the output changed quite a lot, because a lot more asserts now pass.

Ah okay. No easy bulk way right just, just run the swf in ruffle desktop and see what it says!

@evilpie evilpie force-pushed the xml-namespace branch 3 times, most recently from b9cf0df to a1acada Compare August 6, 2023 11:52
activation.context.gc_context,
ns.into_inner(),
)),
ResolveResult::Unknown(ns) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have the xml and xmlns cases as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if <xmlns:dummy/> is even valid XML, because xmlns: is used as an attribute usually, but when correctly binding the namespace like this it already works: <x xmlns:xmlns="http://example.org"><xmlns:a></xmlns:a></x>.

Interestingly Flash might have a bug related to xml:. <xml:a /> works, but <xml:a></xml:a> throws

The element type "a" must be terminated by the matching end-tag "</a>".

<xml:a></a> works! 🤯

Copy link
Collaborator Author

@evilpie evilpie Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I added default support for xml, but not xmlns, prefixes for elements. (Matching Flash)

<xml:a />
no error

<xmlns:a />
TypeError: Error #1083: The prefix "xmlns" for element "a" is not bound.

<root xmlns:xmlns="http://example.org"><xmlns:a /></root>
no error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Soccer Skill Zone: Blue screen issue
5 participants