Pass Atom to Attr:new for the prefix argument.

This commit is contained in:
Ms2ger 2014-11-14 16:00:23 +01:00 committed by Tamir Duberstein
parent 89a0c004d5
commit e8b02acb1d
5 changed files with 13 additions and 15 deletions

View file

@ -109,21 +109,21 @@ pub struct Attr {
impl Attr {
fn new_inherited(local_name: Atom, value: AttrValue, name: Atom, namespace: Namespace,
prefix: Option<DOMString>, owner: Option<JSRef<Element>>) -> Attr {
prefix: Option<Atom>, owner: Option<JSRef<Element>>) -> Attr {
Attr {
reflector_: Reflector::new(),
local_name: local_name,
value: DOMRefCell::new(value),
name: name,
namespace: namespace,
prefix: prefix.map(|p| Atom::from_slice(&p)),
prefix: prefix,
owner: MutNullableHeap::new(owner.map(JS::from_rooted)),
}
}
pub fn new(window: JSRef<Window>, local_name: Atom, value: AttrValue,
name: Atom, namespace: Namespace,
prefix: Option<DOMString>, owner: Option<JSRef<Element>>) -> Temporary<Attr> {
prefix: Option<Atom>, owner: Option<JSRef<Element>>) -> Temporary<Attr> {
reflect_dom_object(
box Attr::new_inherited(local_name, value, name, namespace, prefix, owner),
GlobalRef::Window(window),