mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Merge pull request #3374 from Manishearth/lint_unrooted_jsmanaged
Add lint for ensuring proper rooting of JS<T>; r=jdm
This commit is contained in:
commit
11ba79894a
131 changed files with 345 additions and 28 deletions
|
@ -8,6 +8,7 @@
|
||||||
#![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)]
|
#![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)]
|
||||||
|
|
||||||
#![deny(unused_imports, unused_variable)]
|
#![deny(unused_imports, unused_variable)]
|
||||||
|
#![allow(unrooted_must_root)]
|
||||||
|
|
||||||
#[phase(plugin, link)]
|
#[phase(plugin, link)]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
|
@ -16,18 +16,23 @@ extern crate rustc;
|
||||||
extern crate sync;
|
extern crate sync;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
|
use syntax::attr::AttrMetaMethods;
|
||||||
use rustc::lint::{Context, LintPass, LintPassObject, LintArray};
|
use rustc::lint::{Context, LintPass, LintPassObject, LintArray};
|
||||||
use rustc::plugin::Registry;
|
use rustc::plugin::Registry;
|
||||||
use rustc::middle::ty::expr_ty;
|
use rustc::middle::ty::expr_ty;
|
||||||
|
use rustc::middle::{ty, def};
|
||||||
use rustc::middle::typeck::astconv::AstConv;
|
use rustc::middle::typeck::astconv::AstConv;
|
||||||
use rustc::util::ppaux::Repr;
|
use rustc::util::ppaux::Repr;
|
||||||
|
|
||||||
declare_lint!(TRANSMUTE_TYPE_LINT, Allow,
|
declare_lint!(TRANSMUTE_TYPE_LINT, Allow,
|
||||||
"Warn and report types being transmuted")
|
"Warn and report types being transmuted")
|
||||||
|
declare_lint!(UNROOTED_MUST_ROOT, Deny,
|
||||||
|
"Warn and report usage of unrooted jsmanaged objects")
|
||||||
|
|
||||||
struct Pass;
|
struct TransmutePass;
|
||||||
|
struct UnrootedPass;
|
||||||
|
|
||||||
impl LintPass for Pass {
|
impl LintPass for TransmutePass {
|
||||||
fn get_lints(&self) -> LintArray {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(TRANSMUTE_TYPE_LINT)
|
lint_array!(TRANSMUTE_TYPE_LINT)
|
||||||
}
|
}
|
||||||
|
@ -56,9 +61,109 @@ impl LintPass for Pass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) {
|
||||||
|
match ty.node {
|
||||||
|
ast::TyBox(ref t) | ast::TyUniq(ref t) |
|
||||||
|
ast::TyVec(ref t) | ast::TyFixedLengthVec(ref t, _) |
|
||||||
|
ast::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) => lint_unrooted_ty(cx, &**t, warning),
|
||||||
|
ast::TyPath(_, _, id) => {
|
||||||
|
match cx.tcx.def_map.borrow().get_copy(&id) {
|
||||||
|
def::DefTy(def_id) => {
|
||||||
|
if ty::has_attr(cx.tcx, def_id, "must_root") {
|
||||||
|
cx.span_lint(UNROOTED_MUST_ROOT, ty.span, warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
impl LintPass for UnrootedPass {
|
||||||
|
fn get_lints(&self) -> LintArray {
|
||||||
|
lint_array!(UNROOTED_MUST_ROOT)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn check_struct_def(&mut self, cx: &Context, def: &ast::StructDef, _i: ast::Ident, _gen: &ast::Generics, id: ast::NodeId) {
|
||||||
|
if cx.tcx.map.expect_item(id).attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
|
for ref field in def.fields.iter() {
|
||||||
|
lint_unrooted_ty(cx, &*field.node.ty,
|
||||||
|
"Type must be rooted, use #[must_root] on the struct definition to propagate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn check_variant(&mut self, cx: &Context, var: &ast::Variant, _gen: &ast::Generics) {
|
||||||
|
let ref map = cx.tcx.map;
|
||||||
|
if map.expect_item(map.get_parent(var.node.id)).attrs.iter().all(|a| !a.check_name("must_root")) {
|
||||||
|
match var.node.kind {
|
||||||
|
ast::TupleVariantKind(ref vec) => {
|
||||||
|
for ty in vec.iter() {
|
||||||
|
lint_unrooted_ty(cx, &*ty.ty,
|
||||||
|
"Type must be rooted, use #[must_root] on the enum definition to propagate")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => () // Struct variants already caught by check_struct_def
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn check_fn(&mut self, cx: &Context, kind: &syntax::visit::FnKind, decl: &ast::FnDecl,
|
||||||
|
block: &ast::Block, _span: syntax::codemap::Span, _id: ast::NodeId) {
|
||||||
|
match *kind {
|
||||||
|
syntax::visit::FkItemFn(i, _, _, _) |
|
||||||
|
syntax::visit::FkMethod(i, _, _) if i.as_str() == "new" || i.as_str() == "new_inherited" => {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_ => ()
|
||||||
|
}
|
||||||
|
match block.rules {
|
||||||
|
ast::DefaultBlock => {
|
||||||
|
for arg in decl.inputs.iter() {
|
||||||
|
lint_unrooted_ty(cx, &*arg.ty,
|
||||||
|
"Type must be rooted, use #[must_root] on the fn definition to propagate")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => () // fn is `unsafe`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Partially copied from rustc::middle::lint::builtin
|
||||||
|
// Catches `let` statements which store a #[must_root] value
|
||||||
|
// Expressions which return out of blocks eventually end up in a `let`
|
||||||
|
// statement or a function return (which will be caught when it is used elsewhere)
|
||||||
|
fn check_stmt(&mut self, cx: &Context, s: &ast::Stmt) {
|
||||||
|
// Catch the let binding
|
||||||
|
let expr = match s.node {
|
||||||
|
ast::StmtDecl(ref decl, _) => match decl.node {
|
||||||
|
ast::DeclLocal(ref loc) => match loc.init {
|
||||||
|
Some(ref e) => &**e,
|
||||||
|
_ => return
|
||||||
|
},
|
||||||
|
_ => return
|
||||||
|
},
|
||||||
|
_ => return
|
||||||
|
};
|
||||||
|
|
||||||
|
let t = expr_ty(cx.tcx, &*expr);
|
||||||
|
match ty::get(t).sty {
|
||||||
|
ty::ty_struct(did, _) |
|
||||||
|
ty::ty_enum(did, _) => {
|
||||||
|
if ty::has_attr(cx.tcx, did, "must_root") {
|
||||||
|
cx.span_lint(UNROOTED_MUST_ROOT, expr.span,
|
||||||
|
format!("Expression of type {} must be rooted", t.repr(cx.tcx)).as_slice());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[plugin_registrar]
|
#[plugin_registrar]
|
||||||
pub fn plugin_registrar(reg: &mut Registry) {
|
pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
reg.register_lint_pass(box Pass as LintPassObject);
|
reg.register_lint_pass(box TransmutePass as LintPassObject);
|
||||||
|
reg.register_lint_pass(box UnrootedPass as LintPassObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
|
@ -71,6 +71,7 @@ impl Str for AttrValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Attr {
|
pub struct Attr {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
local_name: Atom,
|
local_name: Atom,
|
||||||
|
@ -107,8 +108,8 @@ impl Attr {
|
||||||
pub fn new(window: &JSRef<Window>, local_name: Atom, value: AttrValue,
|
pub fn new(window: &JSRef<Window>, local_name: Atom, value: AttrValue,
|
||||||
name: Atom, namespace: Namespace,
|
name: Atom, namespace: Namespace,
|
||||||
prefix: Option<DOMString>, owner: &JSRef<Element>) -> Temporary<Attr> {
|
prefix: Option<DOMString>, owner: &JSRef<Element>) -> Temporary<Attr> {
|
||||||
let attr = Attr::new_inherited(local_name, value, name, namespace, prefix, owner);
|
reflect_dom_object(box Attr::new_inherited(local_name, value, name, namespace, prefix, owner),
|
||||||
reflect_dom_object(box attr, &Window(*window), AttrBinding::Wrap)
|
&Window(*window), AttrBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ pub struct CallSetup {
|
||||||
|
|
||||||
impl CallSetup {
|
impl CallSetup {
|
||||||
/// Performs the setup needed to make a call.
|
/// Performs the setup needed to make a call.
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
|
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
|
||||||
let global = global_object_for_js_object(callback.callback());
|
let global = global_object_for_js_object(callback.callback());
|
||||||
let global = global.root();
|
let global = global.root();
|
||||||
|
|
|
@ -2868,7 +2868,10 @@ class CGUnionStruct(CGThing):
|
||||||
enumConversions = [
|
enumConversions = [
|
||||||
" e%s(ref inner) => inner.to_jsval(cx)," % v["name"] for v in templateVars
|
" e%s(ref inner) => inner.to_jsval(cx)," % v["name"] for v in templateVars
|
||||||
]
|
]
|
||||||
return ("""pub enum %s {
|
# XXXManishearth The following should be #[must_root],
|
||||||
|
# however we currently allow it till #2661 is fixed
|
||||||
|
return ("""#[allow(unrooted_must_root)]
|
||||||
|
pub enum %s {
|
||||||
%s
|
%s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ pub enum GlobalRoot<'a, 'b> {
|
||||||
/// A traced reference to a global object, for use in fields of traced Rust
|
/// A traced reference to a global object, for use in fields of traced Rust
|
||||||
/// structures.
|
/// structures.
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub enum GlobalField {
|
pub enum GlobalField {
|
||||||
WindowField(JS<Window>),
|
WindowField(JS<Window>),
|
||||||
WorkerField(JS<WorkerGlobalScope>),
|
WorkerField(JS<WorkerGlobalScope>),
|
||||||
|
|
|
@ -61,6 +61,7 @@ use std::mem;
|
||||||
/// Importantly, it requires explicit rooting in order to interact with the inner value.
|
/// Importantly, it requires explicit rooting in order to interact with the inner value.
|
||||||
/// Can be assigned into JS-owned member fields (i.e. `JS<T>` types) safely via the
|
/// Can be assigned into JS-owned member fields (i.e. `JS<T>` types) safely via the
|
||||||
/// `JS<T>::assign` method or `OptionalSettable::assign` (for `Option<JS<T>>` fields).
|
/// `JS<T>::assign` method or `OptionalSettable::assign` (for `Option<JS<T>>` fields).
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub struct Temporary<T> {
|
pub struct Temporary<T> {
|
||||||
inner: JS<T>,
|
inner: JS<T>,
|
||||||
/// On-stack JS pointer to assuage conservative stack scanner
|
/// On-stack JS pointer to assuage conservative stack scanner
|
||||||
|
@ -106,11 +107,13 @@ impl<T: Reflectable> Temporary<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A rooted, JS-owned value. Must only be used as a field in other JS-owned types.
|
/// A rooted, JS-owned value. Must only be used as a field in other JS-owned types.
|
||||||
|
#[must_root]
|
||||||
pub struct JS<T> {
|
pub struct JS<T> {
|
||||||
ptr: *const T
|
ptr: *const T
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> PartialEq for JS<T> {
|
impl<T> PartialEq for JS<T> {
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
fn eq(&self, other: &JS<T>) -> bool {
|
fn eq(&self, other: &JS<T>) -> bool {
|
||||||
self.ptr == other.ptr
|
self.ptr == other.ptr
|
||||||
}
|
}
|
||||||
|
@ -371,6 +374,7 @@ impl RootCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new stack-bounded root that will not outlive this collection
|
/// Create a new stack-bounded root that will not outlive this collection
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
fn new_root<'a, 'b, T: Reflectable>(&'a self, unrooted: &JS<T>) -> Root<'a, 'b, T> {
|
fn new_root<'a, 'b, T: Reflectable>(&'a self, unrooted: &JS<T>) -> Root<'a, 'b, T> {
|
||||||
Root::new(self, unrooted)
|
Root::new(self, unrooted)
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: JSVal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Trace the `JSObject` held by `reflector`.
|
/// Trace the `JSObject` held by `reflector`.
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn trace_reflector(tracer: *mut JSTracer, description: &str, reflector: &Reflector) {
|
pub fn trace_reflector(tracer: *mut JSTracer, description: &str, reflector: &Reflector) {
|
||||||
trace_object(tracer, description, reflector.get_jsobject())
|
trace_object(tracer, description, reflector.get_jsobject())
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,8 +455,9 @@ pub fn reflect_dom_object<T: Reflectable>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A struct to store a reference to the reflector of a DOM object.
|
/// A struct to store a reference to the reflector of a DOM object.
|
||||||
#[allow(raw_pointer_deriving)]
|
#[allow(raw_pointer_deriving, unrooted_must_root)]
|
||||||
#[deriving(PartialEq)]
|
#[deriving(PartialEq)]
|
||||||
|
#[must_root]
|
||||||
pub struct Reflector {
|
pub struct Reflector {
|
||||||
object: Cell<*mut JSObject>,
|
object: Cell<*mut JSObject>,
|
||||||
}
|
}
|
||||||
|
@ -668,6 +669,7 @@ pub extern fn outerize_global(_cx: *mut JSContext, obj: JSHandleObject) -> *mut
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the global object of the realm that the given JS object was created in.
|
/// Returns the global object of the realm that the given JS object was created in.
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn global_object_for_js_object(obj: *mut JSObject) -> GlobalField {
|
pub fn global_object_for_js_object(obj: *mut JSObject) -> GlobalField {
|
||||||
unsafe {
|
unsafe {
|
||||||
let global = GetGlobalForObjectCrossCompartment(obj);
|
let global = GetGlobalForObjectCrossCompartment(obj);
|
||||||
|
@ -689,6 +691,7 @@ pub fn global_object_for_js_object(obj: *mut JSObject) -> GlobalField {
|
||||||
|
|
||||||
/// Get the `JSContext` for the `JSRuntime` associated with the thread
|
/// Get the `JSContext` for the `JSRuntime` associated with the thread
|
||||||
/// this object is on.
|
/// this object is on.
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
fn cx_for_dom_reflector(obj: *mut JSObject) -> *mut JSContext {
|
fn cx_for_dom_reflector(obj: *mut JSObject) -> *mut JSContext {
|
||||||
let global = global_object_for_js_object(obj);
|
let global = global_object_for_js_object(obj);
|
||||||
let global = global.root();
|
let global = global.root();
|
||||||
|
|
|
@ -16,6 +16,7 @@ pub enum BlobType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Blob {
|
pub struct Blob {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
type_: BlobType
|
type_: BlobType
|
||||||
|
|
|
@ -67,6 +67,7 @@ impl BrowserContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct SessionHistoryEntry {
|
pub struct SessionHistoryEntry {
|
||||||
document: JS<Document>,
|
document: JS<Document>,
|
||||||
children: Vec<BrowserContext>
|
children: Vec<BrowserContext>
|
||||||
|
|
|
@ -17,6 +17,7 @@ use geom::size::Size2D;
|
||||||
use canvas::canvas_render_task::{CanvasMsg, CanvasRenderTask, ClearRect, Close, FillRect, Recreate, StrokeRect};
|
use canvas::canvas_render_task::{CanvasMsg, CanvasRenderTask, ClearRect, Close, FillRect, Recreate, StrokeRect};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct CanvasRenderingContext2D {
|
pub struct CanvasRenderingContext2D {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
global: GlobalField,
|
global: GlobalField,
|
||||||
|
|
|
@ -18,6 +18,7 @@ use servo_util::str::DOMString;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct CharacterData {
|
pub struct CharacterData {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
pub data: Traceable<RefCell<DOMString>>,
|
pub data: Traceable<RefCell<DOMString>>,
|
||||||
|
|
|
@ -17,6 +17,7 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
/// An HTML comment.
|
/// An HTML comment.
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Comment {
|
pub struct Comment {
|
||||||
pub characterdata: CharacterData,
|
pub characterdata: CharacterData,
|
||||||
}
|
}
|
||||||
|
@ -35,8 +36,8 @@ impl Comment {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Comment> {
|
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Comment> {
|
||||||
let node = Comment::new_inherited(text, document);
|
Node::reflect_node(box Comment::new_inherited(text, document),
|
||||||
Node::reflect_node(box node, document, CommentBinding::Wrap)
|
document, CommentBinding::Wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Constructor(global: &GlobalRef, data: DOMString) -> Fallible<Temporary<Comment>> {
|
pub fn Constructor(global: &GlobalRef, data: DOMString) -> Fallible<Temporary<Comment>> {
|
||||||
|
|
|
@ -10,6 +10,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Console {
|
pub struct Console {
|
||||||
pub reflector_: Reflector
|
pub reflector_: Reflector
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ use servo_util::str::DOMString;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct CustomEvent {
|
pub struct CustomEvent {
|
||||||
event: Event,
|
event: Event,
|
||||||
detail: Traceable<Cell<Traceable<JSVal>>>,
|
detail: Traceable<Cell<Traceable<JSVal>>>,
|
||||||
|
|
|
@ -37,6 +37,7 @@ use native::task::NativeTaskBuilder;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DedicatedWorkerGlobalScope {
|
pub struct DedicatedWorkerGlobalScope {
|
||||||
workerglobalscope: WorkerGlobalScope,
|
workerglobalscope: WorkerGlobalScope,
|
||||||
receiver: Untraceable<Receiver<ScriptMsg>>,
|
receiver: Untraceable<Receiver<ScriptMsg>>,
|
||||||
|
|
|
@ -69,6 +69,7 @@ pub enum IsHTMLDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
@ -309,8 +310,8 @@ impl Document {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(window: &JSRef<Window>, url: Option<Url>, doctype: IsHTMLDocument, content_type: Option<DOMString>) -> Temporary<Document> {
|
pub fn new(window: &JSRef<Window>, url: Option<Url>, doctype: IsHTMLDocument, content_type: Option<DOMString>) -> Temporary<Document> {
|
||||||
let document = Document::new_inherited(window, url, doctype, content_type);
|
let document = reflect_dom_object(box Document::new_inherited(window, url, doctype, content_type),
|
||||||
let document = reflect_dom_object(box document, &Window(*window),
|
&Window(*window),
|
||||||
DocumentBinding::Wrap).root();
|
DocumentBinding::Wrap).root();
|
||||||
|
|
||||||
let node: &JSRef<Node> = NodeCast::from_ref(&*document);
|
let node: &JSRef<Node> = NodeCast::from_ref(&*document);
|
||||||
|
|
|
@ -19,6 +19,7 @@ use dom::nodelist::NodeList;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DocumentFragment {
|
pub struct DocumentFragment {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
}
|
}
|
||||||
|
@ -38,8 +39,8 @@ impl DocumentFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(document: &JSRef<Document>) -> Temporary<DocumentFragment> {
|
pub fn new(document: &JSRef<Document>) -> Temporary<DocumentFragment> {
|
||||||
let node = DocumentFragment::new_inherited(document);
|
Node::reflect_node(box DocumentFragment::new_inherited(document),
|
||||||
Node::reflect_node(box node, document, DocumentFragmentBinding::Wrap)
|
document, DocumentFragmentBinding::Wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<DocumentFragment>> {
|
pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<DocumentFragment>> {
|
||||||
|
|
|
@ -14,6 +14,7 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
/// The `DOCTYPE` tag.
|
/// The `DOCTYPE` tag.
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DocumentType {
|
pub struct DocumentType {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
pub name: DOMString,
|
pub name: DOMString,
|
||||||
|
@ -40,7 +41,7 @@ impl DocumentType {
|
||||||
system_id: system_id.unwrap_or("".to_string())
|
system_id: system_id.unwrap_or("".to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(name: DOMString,
|
pub fn new(name: DOMString,
|
||||||
public_id: Option<DOMString>,
|
public_id: Option<DOMString>,
|
||||||
system_id: Option<DOMString>,
|
system_id: Option<DOMString>,
|
||||||
|
|
|
@ -60,6 +60,7 @@ impl DOMErrorName {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMException {
|
pub struct DOMException {
|
||||||
pub code: DOMErrorName,
|
pub code: DOMErrorName,
|
||||||
pub reflector_: Reflector
|
pub reflector_: Reflector
|
||||||
|
|
|
@ -23,6 +23,7 @@ use dom::text::Text;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMImplementation {
|
pub struct DOMImplementation {
|
||||||
document: JS<Document>,
|
document: JS<Document>,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::window::Window;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMParser {
|
pub struct DOMParser {
|
||||||
window: JS<Window>, //XXXjdm Document instead?
|
window: JS<Window>, //XXXjdm Document instead?
|
||||||
reflector_: Reflector
|
reflector_: Reflector
|
||||||
|
|
|
@ -11,6 +11,7 @@ use dom::window::Window;
|
||||||
use servo_util::geometry::Au;
|
use servo_util::geometry::Au;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMRect {
|
pub struct DOMRect {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
top: f32,
|
top: f32,
|
||||||
|
@ -34,8 +35,8 @@ impl DOMRect {
|
||||||
pub fn new(window: &JSRef<Window>,
|
pub fn new(window: &JSRef<Window>,
|
||||||
top: Au, bottom: Au,
|
top: Au, bottom: Au,
|
||||||
left: Au, right: Au) -> Temporary<DOMRect> {
|
left: Au, right: Au) -> Temporary<DOMRect> {
|
||||||
let rect = DOMRect::new_inherited(top, bottom, left, right);
|
reflect_dom_object(box DOMRect::new_inherited(top, bottom, left, right),
|
||||||
reflect_dom_object(box rect, &Window(*window), DOMRectBinding::Wrap)
|
&Window(*window), DOMRectBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ use dom::domrect::DOMRect;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMRectList {
|
pub struct DOMRectList {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
rects: Vec<JS<DOMRect>>,
|
rects: Vec<JS<DOMRect>>,
|
||||||
|
|
|
@ -17,6 +17,7 @@ use servo_util::namespace::Null;
|
||||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct DOMTokenList {
|
pub struct DOMTokenList {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
element: JS<Element>,
|
element: JS<Element>,
|
||||||
|
|
|
@ -42,6 +42,7 @@ use std::cell::{Cell, RefCell};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Element {
|
pub struct Element {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
pub local_name: Atom,
|
pub local_name: Atom,
|
||||||
|
@ -160,8 +161,8 @@ impl Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(local_name: DOMString, namespace: Namespace, prefix: Option<DOMString>, document: &JSRef<Document>) -> Temporary<Element> {
|
pub fn new(local_name: DOMString, namespace: Namespace, prefix: Option<DOMString>, document: &JSRef<Document>) -> Temporary<Element> {
|
||||||
let element = Element::new_inherited(ElementTypeId, local_name, namespace, prefix, document);
|
Node::reflect_node(box Element::new_inherited(ElementTypeId, local_name, namespace, prefix, document),
|
||||||
Node::reflect_node(box element, document, ElementBinding::Wrap)
|
document, ElementBinding::Wrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +174,7 @@ pub trait RawLayoutElementHelpers {
|
||||||
|
|
||||||
impl RawLayoutElementHelpers for Element {
|
impl RawLayoutElementHelpers for Element {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
unsafe fn get_attr_val_for_layout(&self, namespace: &Namespace, name: &str)
|
unsafe fn get_attr_val_for_layout(&self, namespace: &Namespace, name: &str)
|
||||||
-> Option<&'static str> {
|
-> Option<&'static str> {
|
||||||
// cast to point to T in RefCell<T> directly
|
// cast to point to T in RefCell<T> directly
|
||||||
|
@ -188,6 +190,7 @@ impl RawLayoutElementHelpers for Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
unsafe fn get_attr_atom_for_layout(&self, namespace: &Namespace, name: &str)
|
unsafe fn get_attr_atom_for_layout(&self, namespace: &Namespace, name: &str)
|
||||||
-> Option<Atom> {
|
-> Option<Atom> {
|
||||||
// cast to point to T in RefCell<T> directly
|
// cast to point to T in RefCell<T> directly
|
||||||
|
@ -203,6 +206,7 @@ impl RawLayoutElementHelpers for Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
unsafe fn has_class_for_layout(&self, name: &str) -> bool {
|
unsafe fn has_class_for_layout(&self, name: &str) -> bool {
|
||||||
let attrs: *const Vec<JS<Attr>> = mem::transmute(&self.attrs);
|
let attrs: *const Vec<JS<Attr>> = mem::transmute(&self.attrs);
|
||||||
(*attrs).iter().find(|attr: & &JS<Attr>| {
|
(*attrs).iter().find(|attr: & &JS<Attr>| {
|
||||||
|
@ -220,6 +224,7 @@ pub trait LayoutElementHelpers {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LayoutElementHelpers for JS<Element> {
|
impl LayoutElementHelpers for JS<Element> {
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
unsafe fn html_element_in_html_document_for_layout(&self) -> bool {
|
unsafe fn html_element_in_html_document_for_layout(&self) -> bool {
|
||||||
if (*self.unsafe_get()).namespace != namespace::HTML {
|
if (*self.unsafe_get()).namespace != namespace::HTML {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -35,6 +35,7 @@ pub enum EventTypeId {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct Event {
|
pub struct Event {
|
||||||
pub type_id: EventTypeId,
|
pub type_id: EventTypeId,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -62,6 +62,7 @@ pub struct EventListenerEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct EventTarget {
|
pub struct EventTarget {
|
||||||
pub type_id: EventTargetTypeId,
|
pub type_id: EventTargetTypeId,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -11,6 +11,7 @@ use dom::blob::{Blob, BlobType, FileTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct File {
|
pub struct File {
|
||||||
pub blob: Blob,
|
pub blob: Blob,
|
||||||
pub name: DOMString,
|
pub name: DOMString,
|
||||||
|
|
|
@ -19,12 +19,14 @@ use std::cell::RefCell;
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
|
|
||||||
#[deriving(Encodable, Clone)]
|
#[deriving(Encodable, Clone)]
|
||||||
|
#[must_root]
|
||||||
pub enum FormDatum {
|
pub enum FormDatum {
|
||||||
StringData(DOMString),
|
StringData(DOMString),
|
||||||
FileData(JS<File>)
|
FileData(JS<File>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct FormData {
|
pub struct FormData {
|
||||||
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
@ -53,6 +55,7 @@ impl FormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> FormDataMethods for JSRef<'a, FormData> {
|
impl<'a> FormDataMethods for JSRef<'a, FormData> {
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
fn Append(&self, name: DOMString, value: &JSRef<Blob>, filename: Option<DOMString>) {
|
fn Append(&self, name: DOMString, value: &JSRef<Blob>, filename: Option<DOMString>) {
|
||||||
let file = FileData(JS::from_rooted(&self.get_file_from_blob(value, filename)));
|
let file = FileData(JS::from_rooted(&self.get_file_from_blob(value, filename)));
|
||||||
self.data.deref().borrow_mut().insert_or_update_with(name.clone(), vec!(file.clone()),
|
self.data.deref().borrow_mut().insert_or_update_with(name.clone(), vec!(file.clone()),
|
||||||
|
@ -84,7 +87,7 @@ impl<'a> FormDataMethods for JSRef<'a, FormData> {
|
||||||
fn Has(&self, name: DOMString) -> bool {
|
fn Has(&self, name: DOMString) -> bool {
|
||||||
self.data.deref().borrow().contains_key_equiv(&name)
|
self.data.deref().borrow().contains_key_equiv(&name)
|
||||||
}
|
}
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
fn Set(&self, name: DOMString, value: &JSRef<Blob>, filename: Option<DOMString>) {
|
fn Set(&self, name: DOMString, value: &JSRef<Blob>, filename: Option<DOMString>) {
|
||||||
let file = FileData(JS::from_rooted(&self.get_file_from_blob(value, filename)));
|
let file = FileData(JS::from_rooted(&self.get_file_from_blob(value, filename)));
|
||||||
self.data.deref().borrow_mut().insert(name, vec!(file));
|
self.data.deref().borrow_mut().insert(name, vec!(file));
|
||||||
|
|
|
@ -24,6 +24,7 @@ use servo_util::namespace::Null;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLAnchorElement {
|
pub struct HTMLAnchorElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -41,6 +42,7 @@ impl HTMLAnchorElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAnchorElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAnchorElement> {
|
||||||
let element = HTMLAnchorElement::new_inherited(localName, document);
|
let element = HTMLAnchorElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAnchorElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLAppletElement {
|
pub struct HTMLAppletElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLAppletElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAppletElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAppletElement> {
|
||||||
let element = HTMLAppletElement::new_inherited(localName, document);
|
let element = HTMLAppletElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAppletElementBinding::Wrap)
|
||||||
|
|
|
@ -18,6 +18,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLAreaElement {
|
pub struct HTMLAreaElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -35,6 +36,7 @@ impl HTMLAreaElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAreaElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAreaElement> {
|
||||||
let element = HTMLAreaElement::new_inherited(localName, document);
|
let element = HTMLAreaElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAreaElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLAudioElement {
|
pub struct HTMLAudioElement {
|
||||||
pub htmlmediaelement: HTMLMediaElement
|
pub htmlmediaelement: HTMLMediaElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLAudioElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAudioElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLAudioElement> {
|
||||||
let element = HTMLAudioElement::new_inherited(localName, document);
|
let element = HTMLAudioElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLAudioElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLBaseElement {
|
pub struct HTMLBaseElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLBaseElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBaseElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBaseElement> {
|
||||||
let element = HTMLBaseElement::new_inherited(localName, document);
|
let element = HTMLBaseElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBaseElementBinding::Wrap)
|
||||||
|
|
|
@ -21,6 +21,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLBodyElement {
|
pub struct HTMLBodyElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -38,6 +39,7 @@ impl HTMLBodyElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBodyElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBodyElement> {
|
||||||
let element = HTMLBodyElement::new_inherited(localName, document);
|
let element = HTMLBodyElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBodyElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLBRElement {
|
pub struct HTMLBRElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLBRElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBRElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLBRElement> {
|
||||||
let element = HTMLBRElement::new_inherited(localName, document);
|
let element = HTMLBRElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLBRElementBinding::Wrap)
|
||||||
|
|
|
@ -20,6 +20,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLButtonElement {
|
pub struct HTMLButtonElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -37,6 +38,7 @@ impl HTMLButtonElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLButtonElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLButtonElement> {
|
||||||
let element = HTMLButtonElement::new_inherited(localName, document);
|
let element = HTMLButtonElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLButtonElementBinding::Wrap)
|
||||||
|
|
|
@ -29,6 +29,7 @@ static DefaultWidth: u32 = 300;
|
||||||
static DefaultHeight: u32 = 150;
|
static DefaultHeight: u32 = 150;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLCanvasElement {
|
pub struct HTMLCanvasElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
context: Traceable<Cell<Option<JS<CanvasRenderingContext2D>>>>,
|
context: Traceable<Cell<Option<JS<CanvasRenderingContext2D>>>>,
|
||||||
|
@ -52,6 +53,7 @@ impl HTMLCanvasElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLCanvasElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLCanvasElement> {
|
||||||
let element = HTMLCanvasElement::new_inherited(localName, document);
|
let element = HTMLCanvasElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLCanvasElementBinding::Wrap)
|
||||||
|
|
|
@ -30,12 +30,14 @@ impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub enum CollectionTypeId {
|
pub enum CollectionTypeId {
|
||||||
Static(Vec<JS<Element>>),
|
Static(Vec<JS<Element>>),
|
||||||
Live(JS<Node>, Box<CollectionFilter>)
|
Live(JS<Node>, Box<CollectionFilter>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLCollection {
|
pub struct HTMLCollection {
|
||||||
collection: CollectionTypeId,
|
collection: CollectionTypeId,
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLDataElement {
|
pub struct HTMLDataElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLDataElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataElement> {
|
||||||
let element = HTMLDataElement::new_inherited(localName, document);
|
let element = HTMLDataElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDataElementBinding::Wrap)
|
||||||
|
|
|
@ -17,6 +17,7 @@ use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLDataListElement {
|
pub struct HTMLDataListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -34,6 +35,7 @@ impl HTMLDataListElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataListElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDataListElement> {
|
||||||
let element = HTMLDataListElement::new_inherited(localName, document);
|
let element = HTMLDataListElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDataListElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLDirectoryElement {
|
pub struct HTMLDirectoryElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLDirectoryElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDirectoryElement> {
|
||||||
let element = HTMLDirectoryElement::new_inherited(localName, document);
|
let element = HTMLDirectoryElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDirectoryElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLDivElement {
|
pub struct HTMLDivElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLDivElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDivElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDivElement> {
|
||||||
let element = HTMLDivElement::new_inherited(localName, document);
|
let element = HTMLDivElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLDListElement {
|
pub struct HTMLDListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLDListElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDListElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLDListElement> {
|
||||||
let element = HTMLDListElement::new_inherited(localName, document);
|
let element = HTMLDListElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLDListElementBinding::Wrap)
|
||||||
|
|
|
@ -22,6 +22,7 @@ use servo_util::namespace;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLElement {
|
pub struct HTMLElement {
|
||||||
pub element: Element
|
pub element: Element
|
||||||
}
|
}
|
||||||
|
@ -43,6 +44,7 @@ impl HTMLElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLElement> {
|
||||||
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
|
let element = HTMLElement::new_inherited(HTMLElementTypeId, localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLEmbedElement {
|
pub struct HTMLEmbedElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLEmbedElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLEmbedElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLEmbedElement> {
|
||||||
let element = HTMLEmbedElement::new_inherited(localName, document);
|
let element = HTMLEmbedElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLEmbedElementBinding::Wrap)
|
||||||
|
|
|
@ -22,6 +22,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::{DOMString, StaticStringVec};
|
use servo_util::str::{DOMString, StaticStringVec};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLFieldSetElement {
|
pub struct HTMLFieldSetElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -39,6 +40,7 @@ impl HTMLFieldSetElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFieldSetElement> {
|
||||||
let element = HTMLFieldSetElement::new_inherited(localName, document);
|
let element = HTMLFieldSetElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFieldSetElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLFontElement {
|
pub struct HTMLFontElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLFontElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFontElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFontElement> {
|
||||||
let element = HTMLFontElement::new_inherited(localName, document);
|
let element = HTMLFontElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFontElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLFormElement {
|
pub struct HTMLFormElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLFormElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFormElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFormElement> {
|
||||||
let element = HTMLFormElement::new_inherited(localName, document);
|
let element = HTMLFormElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFormElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLFrameElement {
|
pub struct HTMLFrameElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLFrameElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameElement> {
|
||||||
let element = HTMLFrameElement::new_inherited(localName, document);
|
let element = HTMLFrameElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFrameElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLFrameSetElement {
|
pub struct HTMLFrameSetElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLFrameSetElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLFrameSetElement> {
|
||||||
let element = HTMLFrameSetElement::new_inherited(localName, document);
|
let element = HTMLFrameSetElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLFrameSetElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLHeadElement {
|
pub struct HTMLHeadElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLHeadElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHeadElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHeadElement> {
|
||||||
let element = HTMLHeadElement::new_inherited(localName, document);
|
let element = HTMLHeadElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHeadElementBinding::Wrap)
|
||||||
|
|
|
@ -24,6 +24,7 @@ pub enum HeadingLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLHeadingElement {
|
pub struct HTMLHeadingElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
pub level: HeadingLevel,
|
pub level: HeadingLevel,
|
||||||
|
@ -43,6 +44,7 @@ impl HTMLHeadingElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>, level: HeadingLevel) -> Temporary<HTMLHeadingElement> {
|
||||||
let element = HTMLHeadingElement::new_inherited(localName, document, level);
|
let element = HTMLHeadingElement::new_inherited(localName, document, level);
|
||||||
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHeadingElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLHRElement {
|
pub struct HTMLHRElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLHRElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHRElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHRElement> {
|
||||||
let element = HTMLHRElement::new_inherited(localName, document);
|
let element = HTMLHRElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHRElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLHtmlElement {
|
pub struct HTMLHtmlElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLHtmlElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHtmlElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLHtmlElement> {
|
||||||
let element = HTMLHtmlElement::new_inherited(localName, document);
|
let element = HTMLHtmlElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLHtmlElementBinding::Wrap)
|
||||||
|
|
|
@ -42,6 +42,7 @@ enum SandboxAllowance {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLIFrameElement {
|
pub struct HTMLIFrameElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
pub size: Traceable<Cell<Option<IFrameSize>>>,
|
pub size: Traceable<Cell<Option<IFrameSize>>>,
|
||||||
|
@ -122,6 +123,7 @@ impl HTMLIFrameElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLIFrameElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLIFrameElement> {
|
||||||
let element = HTMLIFrameElement::new_inherited(localName, document);
|
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLIFrameElementBinding::Wrap)
|
||||||
|
|
|
@ -26,6 +26,7 @@ use url::{Url, UrlParser};
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLImageElement {
|
pub struct HTMLImageElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
image: Untraceable<RefCell<Option<Url>>>,
|
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> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLImageElement> {
|
||||||
let element = HTMLImageElement::new_inherited(localName, document);
|
let element = HTMLImageElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLImageElementBinding::Wrap)
|
||||||
|
|
|
@ -19,6 +19,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLInputElement {
|
pub struct HTMLInputElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ impl HTMLInputElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLInputElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLInputElement> {
|
||||||
let element = HTMLInputElement::new_inherited(localName, document);
|
let element = HTMLInputElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLInputElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLLabelElement {
|
pub struct HTMLLabelElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLLabelElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLabelElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLabelElement> {
|
||||||
let element = HTMLLabelElement::new_inherited(localName, document);
|
let element = HTMLLabelElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLabelElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLLegendElement {
|
pub struct HTMLLegendElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLLegendElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLegendElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLegendElement> {
|
||||||
let element = HTMLLegendElement::new_inherited(localName, document);
|
let element = HTMLLegendElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLegendElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLLIElement {
|
pub struct HTMLLIElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLLIElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLIElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLIElement> {
|
||||||
let element = HTMLLIElement::new_inherited(localName, document);
|
let element = HTMLLIElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLIElementBinding::Wrap)
|
||||||
|
|
|
@ -23,6 +23,7 @@ use std::ascii::StrAsciiExt;
|
||||||
use url::UrlParser;
|
use url::UrlParser;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLLinkElement {
|
pub struct HTMLLinkElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@ impl HTMLLinkElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLinkElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLLinkElement> {
|
||||||
let element = HTMLLinkElement::new_inherited(localName, document);
|
let element = HTMLLinkElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLLinkElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLMapElement {
|
pub struct HTMLMapElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLMapElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMapElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMapElement> {
|
||||||
let element = HTMLMapElement::new_inherited(localName, document);
|
let element = HTMLMapElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMapElementBinding::Wrap)
|
||||||
|
|
|
@ -13,6 +13,7 @@ use dom::node::ElementNodeTypeId;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLMediaElement {
|
pub struct HTMLMediaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLMetaElement {
|
pub struct HTMLMetaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLMetaElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMetaElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMetaElement> {
|
||||||
let element = HTMLMetaElement::new_inherited(localName, document);
|
let element = HTMLMetaElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMetaElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLMeterElement {
|
pub struct HTMLMeterElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLMeterElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMeterElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMeterElement> {
|
||||||
let element = HTMLMeterElement::new_inherited(localName, document);
|
let element = HTMLMeterElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLMeterElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLModElement {
|
pub struct HTMLModElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLModElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLModElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLModElement> {
|
||||||
let element = HTMLModElement::new_inherited(localName, document);
|
let element = HTMLModElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLModElementBinding::Wrap)
|
||||||
|
|
|
@ -27,6 +27,7 @@ use servo_util::str::DOMString;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLObjectElement {
|
pub struct HTMLObjectElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -44,6 +45,7 @@ impl HTMLObjectElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLObjectElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLObjectElement> {
|
||||||
let element = HTMLObjectElement::new_inherited(localName, document);
|
let element = HTMLObjectElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLObjectElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLOListElement {
|
pub struct HTMLOListElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLOListElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOListElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOListElement> {
|
||||||
let element = HTMLOListElement::new_inherited(localName, document);
|
let element = HTMLOListElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOListElementBinding::Wrap)
|
||||||
|
|
|
@ -19,6 +19,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLOptGroupElement {
|
pub struct HTMLOptGroupElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ impl HTMLOptGroupElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptGroupElement> {
|
||||||
let element = HTMLOptGroupElement::new_inherited(localName, document);
|
let element = HTMLOptGroupElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOptGroupElementBinding::Wrap)
|
||||||
|
|
|
@ -19,6 +19,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLOptionElement {
|
pub struct HTMLOptionElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ impl HTMLOptionElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptionElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOptionElement> {
|
||||||
let element = HTMLOptionElement::new_inherited(localName, document);
|
let element = HTMLOptionElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOptionElementBinding::Wrap)
|
||||||
|
|
|
@ -16,6 +16,7 @@ use dom::validitystate::ValidityState;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLOutputElement {
|
pub struct HTMLOutputElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -33,6 +34,7 @@ impl HTMLOutputElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOutputElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLOutputElement> {
|
||||||
let element = HTMLOutputElement::new_inherited(localName, document);
|
let element = HTMLOutputElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLOutputElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLParagraphElement {
|
pub struct HTMLParagraphElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLParagraphElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParagraphElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParagraphElement> {
|
||||||
let element = HTMLParagraphElement::new_inherited(localName, document);
|
let element = HTMLParagraphElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLParagraphElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLParamElement {
|
pub struct HTMLParamElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLParamElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParamElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLParamElement> {
|
||||||
let element = HTMLParamElement::new_inherited(localName, document);
|
let element = HTMLParamElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLParamElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLPreElement {
|
pub struct HTMLPreElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLPreElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLPreElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLPreElement> {
|
||||||
let element = HTMLPreElement::new_inherited(localName, document);
|
let element = HTMLPreElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLPreElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLProgressElement {
|
pub struct HTMLProgressElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLProgressElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLProgressElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLProgressElement> {
|
||||||
let element = HTMLProgressElement::new_inherited(localName, document);
|
let element = HTMLProgressElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLQuoteElement {
|
pub struct HTMLQuoteElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLQuoteElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLQuoteElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLQuoteElement> {
|
||||||
let element = HTMLQuoteElement::new_inherited(localName, document);
|
let element = HTMLQuoteElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLQuoteElementBinding::Wrap)
|
||||||
|
|
|
@ -20,6 +20,7 @@ use servo_util::namespace::Null;
|
||||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec};
|
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS, StaticStringVec};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLScriptElement {
|
pub struct HTMLScriptElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -37,6 +38,7 @@ impl HTMLScriptElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLScriptElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLScriptElement> {
|
||||||
let element = HTMLScriptElement::new_inherited(localName, document);
|
let element = HTMLScriptElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLScriptElementBinding::Wrap)
|
||||||
|
|
|
@ -22,6 +22,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLSelectElement {
|
pub struct HTMLSelectElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -39,6 +40,7 @@ impl HTMLSelectElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSelectElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSelectElement> {
|
||||||
let element = HTMLSelectElement::new_inherited(localName, document);
|
let element = HTMLSelectElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSelectElementBinding::Wrap)
|
||||||
|
|
|
@ -21,6 +21,7 @@ use dom::text::Text;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn serialize(iterator: &mut NodeIterator) -> String {
|
pub fn serialize(iterator: &mut NodeIterator) -> String {
|
||||||
let mut html = String::new();
|
let mut html = String::new();
|
||||||
let mut open_elements: Vec<String> = vec!();
|
let mut open_elements: Vec<String> = vec!();
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLSourceElement {
|
pub struct HTMLSourceElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLSourceElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSourceElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSourceElement> {
|
||||||
let element = HTMLSourceElement::new_inherited(localName, document);
|
let element = HTMLSourceElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSourceElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLSpanElement {
|
pub struct HTMLSpanElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLSpanElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSpanElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLSpanElement> {
|
||||||
let element = HTMLSpanElement::new_inherited(localName, document);
|
let element = HTMLSpanElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLSpanElementBinding::Wrap)
|
||||||
|
|
|
@ -18,6 +18,7 @@ use servo_util::str::DOMString;
|
||||||
use style::Stylesheet;
|
use style::Stylesheet;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLStyleElement {
|
pub struct HTMLStyleElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -35,6 +36,7 @@ impl HTMLStyleElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLStyleElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLStyleElement> {
|
||||||
let element = HTMLStyleElement::new_inherited(localName, document);
|
let element = HTMLStyleElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLStyleElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableCaptionElement {
|
pub struct HTMLTableCaptionElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableCaptionElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableCaptionElement> {
|
||||||
let element = HTMLTableCaptionElement::new_inherited(localName, document);
|
let element = HTMLTableCaptionElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableCaptionElementBinding::Wrap)
|
||||||
|
|
|
@ -13,6 +13,7 @@ use dom::node::ElementNodeTypeId;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableCellElement {
|
pub struct HTMLTableCellElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableColElement {
|
pub struct HTMLTableColElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableColElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableColElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableColElement> {
|
||||||
let element = HTMLTableColElement::new_inherited(localName, document);
|
let element = HTMLTableColElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableColElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableDataCellElement {
|
pub struct HTMLTableDataCellElement {
|
||||||
pub htmltablecellelement: HTMLTableCellElement,
|
pub htmltablecellelement: HTMLTableCellElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableDataCellElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableDataCellElement> {
|
||||||
let element = HTMLTableDataCellElement::new_inherited(localName, document);
|
let element = HTMLTableDataCellElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableDataCellElementBinding::Wrap)
|
||||||
|
|
|
@ -18,6 +18,7 @@ use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableElement {
|
pub struct HTMLTableElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -35,6 +36,7 @@ impl HTMLTableElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableElement> {
|
||||||
let element = HTMLTableElement::new_inherited(localName, document);
|
let element = HTMLTableElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableHeaderCellElement {
|
pub struct HTMLTableHeaderCellElement {
|
||||||
pub htmltablecellelement: HTMLTableCellElement,
|
pub htmltablecellelement: HTMLTableCellElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableHeaderCellElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableHeaderCellElement> {
|
||||||
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
|
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableRowElement {
|
pub struct HTMLTableRowElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableRowElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableRowElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableRowElement> {
|
||||||
let element = HTMLTableRowElement::new_inherited(localName, document);
|
let element = HTMLTableRowElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableRowElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTableSectionElement {
|
pub struct HTMLTableSectionElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTableSectionElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTableSectionElement> {
|
||||||
let element = HTMLTableSectionElement::new_inherited(localName, document);
|
let element = HTMLTableSectionElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTableSectionElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTemplateElement {
|
pub struct HTMLTemplateElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTemplateElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTemplateElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTemplateElement> {
|
||||||
let element = HTMLTemplateElement::new_inherited(localName, document);
|
let element = HTMLTemplateElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTemplateElementBinding::Wrap)
|
||||||
|
|
|
@ -19,6 +19,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTextAreaElement {
|
pub struct HTMLTextAreaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ impl HTMLTextAreaElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTextAreaElement> {
|
||||||
let element = HTMLTextAreaElement::new_inherited(localName, document);
|
let element = HTMLTextAreaElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTextAreaElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTimeElement {
|
pub struct HTMLTimeElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTimeElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTimeElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTimeElement> {
|
||||||
let element = HTMLTimeElement::new_inherited(localName, document);
|
let element = HTMLTimeElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTimeElementBinding::Wrap)
|
||||||
|
|
|
@ -17,6 +17,7 @@ use dom::text::Text;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTitleElement {
|
pub struct HTMLTitleElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -34,6 +35,7 @@ impl HTMLTitleElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTitleElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTitleElement> {
|
||||||
let element = HTMLTitleElement::new_inherited(localName, document);
|
let element = HTMLTitleElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTitleElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLTrackElement {
|
pub struct HTMLTrackElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLTrackElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTrackElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLTrackElement> {
|
||||||
let element = HTMLTrackElement::new_inherited(localName, document);
|
let element = HTMLTrackElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLTrackElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLUListElement {
|
pub struct HTMLUListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLUListElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUListElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUListElement> {
|
||||||
let element = HTMLUListElement::new_inherited(localName, document);
|
let element = HTMLUListElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLUListElementBinding::Wrap)
|
||||||
|
|
|
@ -14,6 +14,7 @@ use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
|
#[must_root]
|
||||||
pub struct HTMLUnknownElement {
|
pub struct HTMLUnknownElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
@ -31,6 +32,7 @@ impl HTMLUnknownElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUnknownElement> {
|
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLUnknownElement> {
|
||||||
let element = HTMLUnknownElement::new_inherited(localName, document);
|
let element = HTMLUnknownElement::new_inherited(localName, document);
|
||||||
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)
|
Node::reflect_node(box element, document, HTMLUnknownElementBinding::Wrap)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue