mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use #[must_root] for HTMLElements
This commit is contained in:
parent
30014c3919
commit
f5087e1490
70 changed files with 138 additions and 5 deletions
|
@ -26,6 +26,7 @@ use url::{Url, UrlParser};
|
|||
use std::cell::RefCell;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
#[must_root]
|
||||
pub struct HTMLImageElement {
|
||||
pub htmlelement: HTMLElement,
|
||||
image: Untraceable<RefCell<Option<Url>>>,
|
||||
|
@ -78,6 +79,7 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLImageElement> {
|
||||
let element = HTMLImageElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue