avm2: Preserve attribute flag when filling lazy multiname with QName
Fixes #12570
This commit is contained in:
parent
879dac347c
commit
33164d3f56
|
@ -253,8 +253,13 @@ impl<'gc> Multiname<'gc> {
|
||||||
if self.has_lazy_ns() {
|
if self.has_lazy_ns() {
|
||||||
let _ = activation.pop_stack(); // ignore the ns component
|
let _ = activation.pop_stack(); // ignore the ns component
|
||||||
}
|
}
|
||||||
let name = qname_object.name();
|
let mut name = qname_object.name().clone();
|
||||||
return Ok(name.clone());
|
|
||||||
|
if self.is_attribute() {
|
||||||
|
name.set_is_attribute(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(name_value.coerce_to_string(activation)?)
|
Some(name_value.coerce_to_string(activation)?)
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package
|
||||||
|
{
|
||||||
|
import flash.display.Sprite;
|
||||||
|
|
||||||
|
public class Test extends Sprite
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var xml =
|
||||||
|
<alpha>
|
||||||
|
<bravo attr1="value1" attr2="wrong">
|
||||||
|
<charlie attr1="value2" attr2="wrong"/>
|
||||||
|
</bravo>
|
||||||
|
</alpha>;
|
||||||
|
|
||||||
|
var q = new QName("attr1");
|
||||||
|
trace("xml..@[q]: " + xml..@[q]);
|
|
@ -0,0 +1 @@
|
||||||
|
xml..@[q]: value1value2
|
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
num_ticks = 1
|
Loading…
Reference in New Issue