mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #3468 from Manishearth/jstraceable
Replace our usage our Encodable with JSTraceable; r=jdm
This commit is contained in:
commit
95a4731c0e
135 changed files with 409 additions and 273 deletions
|
@ -9,7 +9,6 @@ use geom::rect::Rect;
|
||||||
use geom::size::TypedSize2D;
|
use geom::size::TypedSize2D;
|
||||||
use geom::scale_factor::ScaleFactor;
|
use geom::scale_factor::ScaleFactor;
|
||||||
use layers::geometry::DevicePixel;
|
use layers::geometry::DevicePixel;
|
||||||
use serialize::Encodable;
|
|
||||||
use servo_util::geometry::{PagePx, ViewportPx};
|
use servo_util::geometry::{PagePx, ViewportPx};
|
||||||
use std::comm::{channel, Sender, Receiver};
|
use std::comm::{channel, Sender, Receiver};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -37,7 +36,6 @@ pub struct Failure {
|
||||||
pub subpage_id: Option<SubpageId>,
|
pub subpage_id: Option<SubpageId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
|
||||||
pub struct WindowSizeData {
|
pub struct WindowSizeData {
|
||||||
/// The size of the initial layout viewport, before parsing an
|
/// The size of the initial layout viewport, before parsing an
|
||||||
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
|
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
|
||||||
|
@ -77,8 +75,8 @@ pub enum NavigationDirection {
|
||||||
Back,
|
Back,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Clone, PartialEq, Eq, Hash, Encodable)]
|
#[deriving(Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct PipelineId(pub uint);
|
pub struct PipelineId(pub uint);
|
||||||
|
|
||||||
#[deriving(Clone, PartialEq, Eq, Hash, Encodable)]
|
#[deriving(Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct SubpageId(pub uint);
|
pub struct SubpageId(pub uint);
|
||||||
|
|
60
components/plugins/jstraceable.rs
Normal file
60
components/plugins/jstraceable.rs
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use syntax::ext::base::ExtCtxt;
|
||||||
|
use syntax::codemap::Span;
|
||||||
|
use syntax::ptr::P;
|
||||||
|
use syntax::ast::{Item, MetaItem, Expr};
|
||||||
|
use syntax::ast;
|
||||||
|
use syntax::ext::build::AstBuilder;
|
||||||
|
use syntax::ext::deriving::generic::{combine_substructure, EnumMatching, FieldInfo, MethodDef, Struct, Substructure, TraitDef, ty};
|
||||||
|
|
||||||
|
pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item: &Item, push: |P<Item>|) {
|
||||||
|
let trait_def = TraitDef {
|
||||||
|
span: span,
|
||||||
|
attributes: Vec::new(),
|
||||||
|
path: ty::Path::new(vec!("dom","bindings","trace","JSTraceable")),
|
||||||
|
additional_bounds: Vec::new(),
|
||||||
|
generics: ty::LifetimeBounds::empty(),
|
||||||
|
methods: vec!(
|
||||||
|
MethodDef {
|
||||||
|
name: "trace",
|
||||||
|
generics: ty::LifetimeBounds::empty(),
|
||||||
|
explicit_self: ty::borrowed_explicit_self(),
|
||||||
|
args: vec!(ty::Ptr(box ty::Literal(ty::Path::new(vec!("js","jsapi","JSTracer"))), ty::Raw(ast::MutMutable))),
|
||||||
|
ret_ty: ty::nil_ty(),
|
||||||
|
attributes: vec!(),
|
||||||
|
combine_substructure: combine_substructure(|a, b, c| {
|
||||||
|
jstraceable_substructure(a, b, c)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
};
|
||||||
|
trait_def.expand(cx, mitem, item, push)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mostly copied from syntax::ext::deriving::hash
|
||||||
|
fn jstraceable_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> P<Expr> {
|
||||||
|
let state_expr = match substr.nonself_args {
|
||||||
|
[ref state_expr] => state_expr,
|
||||||
|
_ => cx.span_bug(trait_span, "incorrect number of arguments in `jstraceable`")
|
||||||
|
};
|
||||||
|
let trace_ident = substr.method_ident;
|
||||||
|
let call_trace = |span, thing_expr| {
|
||||||
|
let expr = cx.expr_method_call(span, thing_expr, trace_ident, vec!(state_expr.clone()));
|
||||||
|
cx.stmt_expr(expr)
|
||||||
|
};
|
||||||
|
let mut stmts = Vec::new();
|
||||||
|
|
||||||
|
let fields = match *substr.fields {
|
||||||
|
Struct(ref fs) | EnumMatching(_, _, ref fs) => fs,
|
||||||
|
_ => cx.span_bug(trait_span, "impossible substructure in `jstraceable`")
|
||||||
|
};
|
||||||
|
|
||||||
|
for &FieldInfo { ref self_, span, .. } in fields.iter() {
|
||||||
|
stmts.push(call_trace(span, self_.clone()));
|
||||||
|
}
|
||||||
|
|
||||||
|
cx.expr_block(cx.block(trait_span, stmts, None))
|
||||||
|
}
|
|
@ -6,8 +6,6 @@
|
||||||
|
|
||||||
#![deny(unused_imports, unused_variable)]
|
#![deny(unused_imports, unused_variable)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[phase(plugin,link)]
|
#[phase(plugin,link)]
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
#[phase(plugin, link)]
|
#[phase(plugin, link)]
|
||||||
|
@ -17,14 +15,18 @@ extern crate sync;
|
||||||
|
|
||||||
use rustc::lint::LintPassObject;
|
use rustc::lint::LintPassObject;
|
||||||
use rustc::plugin::Registry;
|
use rustc::plugin::Registry;
|
||||||
|
use syntax::ext::base::ItemDecorator;
|
||||||
|
|
||||||
|
use syntax::parse::token::intern;
|
||||||
|
|
||||||
mod lints;
|
mod lints;
|
||||||
mod macros;
|
mod macros;
|
||||||
|
mod jstraceable;
|
||||||
|
|
||||||
#[plugin_registrar]
|
#[plugin_registrar]
|
||||||
pub fn plugin_registrar(reg: &mut Registry) {
|
pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
|
reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
|
||||||
reg.register_lint_pass(box lints::UnrootedPass as LintPassObject);
|
reg.register_lint_pass(box lints::UnrootedPass as LintPassObject);
|
||||||
|
reg.register_syntax_extension(intern("jstraceable"), ItemDecorator(box jstraceable::expand_jstraceable))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ pub enum AttrSettingType {
|
||||||
ReplacedAttr,
|
ReplacedAttr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq, Clone, Encodable)]
|
#[deriving(PartialEq, Clone)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum AttrValue {
|
pub enum AttrValue {
|
||||||
StringAttrValue(DOMString),
|
StringAttrValue(DOMString),
|
||||||
TokenListAttrValue(DOMString, Vec<Atom>),
|
TokenListAttrValue(DOMString, Vec<Atom>),
|
||||||
|
@ -72,7 +73,7 @@ impl Str for AttrValue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Attr {
|
pub struct Attr {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -13,13 +13,14 @@ This is very tricky and magically mechanism helped by Rust Compiler.
|
||||||
The outline is:
|
The outline is:
|
||||||
|
|
||||||
1. SpiderMonkey's GC calls `JSClass.trace` defined in `FooBinding` when marking phase. This JSClass is basis of each wrapper JSObject.
|
1. SpiderMonkey's GC calls `JSClass.trace` defined in `FooBinding` when marking phase. This JSClass is basis of each wrapper JSObject.
|
||||||
2. `JSClass.trace` calls `Foo::trace()` defined in InhertTypes.rs.
|
2. `JSClass.trace` calls `Foo::trace()` (an implementation of `JSTraceable`).
|
||||||
3. `Foo::trace()` calls `Foo::encode()`. This `encode()` method is derived by the annotation of `#[deriving(Encodable)]` for a Rust DOM Element struct.
|
This is typically derived via a #[jstraceable] annotation
|
||||||
4. `Foo::encode()` calls `JS<T>::encode()` method of `JS<T>` which is contained to `Foo`’s member. So this is the compiler magic! Rust compiler generates [codes like this](https://github.com/mozilla/rust/blob/db5206c32a879d5058d6a5cdce39c13c763fbdd5/src/libsyntax/ext/deriving/encodable.rs) for all structs annotated `#[deriving(Encodable)]`. This is based on [the assumption](https://github.com/mozilla/servo/blob/54da52fa774ce2ee59fcf811af595bf292169ad8/src/components/script/dom/bindings/trace.rs#L16).
|
3. For all fields (except those wrapped in `Untraceable`), `Foo::trace()`
|
||||||
5. `JS<T>::encode()` calls `dom::bindings::trace::trace_reflector()`.
|
calls `trace()` on the field. For example, for fields of type `JS<T>`, `JS<T>::trace()` calls
|
||||||
6. `trace_reflector()` fetches the reflector that is reachable from a Rust object, and notifies it to the GC with using JSTracer.
|
`trace_reflector()`.
|
||||||
7. This operation continues to the end of the graph.
|
4. `trace_reflector()` fetches the reflector that is reachable from a Rust object, and notifies it to the GC with using JSTracer.
|
||||||
8. Finally, GC gets whether Rust object lives or not from JSObjects which is hold by Rust object.
|
5. This operation continues to the end of the graph.
|
||||||
|
6. Finally, GC gets whether Rust object lives or not from JSObjects which is hold by Rust object.
|
||||||
|
|
||||||
|
|
||||||
## Destruct
|
## Destruct
|
||||||
|
|
|
@ -13,8 +13,6 @@ use js::jsval::{JSVal, UndefinedValue};
|
||||||
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
use serialize::{Encodable, Encoder};
|
|
||||||
|
|
||||||
/// The exception handling used for a call.
|
/// The exception handling used for a call.
|
||||||
pub enum ExceptionHandling {
|
pub enum ExceptionHandling {
|
||||||
/// Report any exception and don't throw it to the caller code.
|
/// Report any exception and don't throw it to the caller code.
|
||||||
|
@ -28,7 +26,8 @@ pub enum ExceptionHandling {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A common base class for representing IDL callback function types.
|
/// A common base class for representing IDL callback function types.
|
||||||
#[deriving(Clone,PartialEq,Encodable)]
|
#[deriving(Clone,PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub struct CallbackFunction {
|
pub struct CallbackFunction {
|
||||||
object: CallbackObject
|
object: CallbackObject
|
||||||
}
|
}
|
||||||
|
@ -44,7 +43,8 @@ impl CallbackFunction {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A common base class for representing IDL callback interface types.
|
/// A common base class for representing IDL callback interface types.
|
||||||
#[deriving(Clone,PartialEq,Encodable)]
|
#[deriving(Clone,PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub struct CallbackInterface {
|
pub struct CallbackInterface {
|
||||||
object: CallbackObject
|
object: CallbackObject
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,8 @@ pub struct CallbackInterface {
|
||||||
/// A common base class for representing IDL callback function and
|
/// A common base class for representing IDL callback function and
|
||||||
/// callback interface types.
|
/// callback interface types.
|
||||||
#[allow(raw_pointer_deriving)]
|
#[allow(raw_pointer_deriving)]
|
||||||
#[deriving(Clone,PartialEq,Encodable)]
|
#[deriving(Clone,PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
struct CallbackObject {
|
struct CallbackObject {
|
||||||
/// The underlying `JSObject`.
|
/// The underlying `JSObject`.
|
||||||
callback: Traceable<*mut JSObject>,
|
callback: Traceable<*mut JSObject>,
|
||||||
|
|
|
@ -2754,7 +2754,8 @@ use js::jsapi::JSContext;
|
||||||
use js::jsval::JSVal;
|
use js::jsval::JSVal;
|
||||||
|
|
||||||
#[repr(uint)]
|
#[repr(uint)]
|
||||||
#[deriving(Encodable, PartialEq)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum valuelist {
|
pub enum valuelist {
|
||||||
%s
|
%s
|
||||||
}
|
}
|
||||||
|
@ -4893,7 +4894,7 @@ class CGCallback(CGClass):
|
||||||
bases=[ClassBase(baseName)],
|
bases=[ClassBase(baseName)],
|
||||||
constructors=self.getConstructors(),
|
constructors=self.getConstructors(),
|
||||||
methods=realMethods+getters+setters,
|
methods=realMethods+getters+setters,
|
||||||
decorators="#[deriving(PartialEq,Clone,Encodable)]")
|
decorators="#[deriving(PartialEq,Clone)]#[jstraceable]")
|
||||||
|
|
||||||
def getConstructors(self):
|
def getConstructors(self):
|
||||||
return [ClassConstructor(
|
return [ClassConstructor(
|
||||||
|
@ -5438,7 +5439,6 @@ class GlobalGenRoots():
|
||||||
CGGeneric("use dom::bindings::js::{JS, JSRef, Temporary};\n"),
|
CGGeneric("use dom::bindings::js::{JS, JSRef, Temporary};\n"),
|
||||||
CGGeneric("use dom::bindings::trace::JSTraceable;\n"),
|
CGGeneric("use dom::bindings::trace::JSTraceable;\n"),
|
||||||
CGGeneric("use dom::bindings::utils::Reflectable;\n"),
|
CGGeneric("use dom::bindings::utils::Reflectable;\n"),
|
||||||
CGGeneric("use serialize::{Encodable, Encoder};\n"),
|
|
||||||
CGGeneric("use js::jsapi::JSTracer;\n\n")]
|
CGGeneric("use js::jsapi::JSTracer;\n\n")]
|
||||||
for descriptor in descriptors:
|
for descriptor in descriptors:
|
||||||
name = descriptor.name
|
name = descriptor.name
|
||||||
|
@ -5500,16 +5500,7 @@ class GlobalGenRoots():
|
||||||
'toBound': name + 'Derived'})),
|
'toBound': name + 'Derived'})),
|
||||||
CGGeneric("impl %s for %s {}\n\n" % (name + 'Cast', name))]
|
CGGeneric("impl %s for %s {}\n\n" % (name + 'Cast', name))]
|
||||||
|
|
||||||
trace = [CGGeneric(string.Template('''impl JSTraceable for ${name} {
|
allprotos += protos + derived + cast
|
||||||
fn trace(&self, tracer: *mut JSTracer) {
|
|
||||||
unsafe {
|
|
||||||
self.encode(&mut *tracer).ok().expect("failed to encode");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
''').substitute({'name': name}))]
|
|
||||||
|
|
||||||
allprotos += protos + derived + cast + trace
|
|
||||||
|
|
||||||
curr = CGList(allprotos)
|
curr = CGList(allprotos)
|
||||||
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
|
curr = CGWrapper(curr, pre=AUTOGENERATED_WARNING_COMMENT)
|
||||||
|
|
|
@ -33,7 +33,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)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub enum GlobalField {
|
pub enum GlobalField {
|
||||||
WindowField(JS<Window>),
|
WindowField(JS<Window>),
|
||||||
|
|
|
@ -10,7 +10,8 @@ use std::path::BytesContainer;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
/// Encapsulates the IDL `ByteString` type.
|
/// Encapsulates the IDL `ByteString` type.
|
||||||
#[deriving(Encodable,Clone,Eq,PartialEq)]
|
#[deriving(Clone,Eq,PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub struct ByteString(Vec<u8>);
|
pub struct ByteString(Vec<u8>);
|
||||||
|
|
||||||
impl ByteString {
|
impl ByteString {
|
||||||
|
|
|
@ -11,55 +11,46 @@
|
||||||
//! 1. The GC calls `_trace` defined in `FooBinding` during the marking
|
//! 1. The GC calls `_trace` defined in `FooBinding` during the marking
|
||||||
//! phase. (This happens through `JSClass.trace` for non-proxy bindings, and
|
//! phase. (This happens through `JSClass.trace` for non-proxy bindings, and
|
||||||
//! through `ProxyTraps.trace` otherwise.)
|
//! through `ProxyTraps.trace` otherwise.)
|
||||||
//! 2. `_trace` calls `Foo::trace()` (an implementation of `JSTraceable`,
|
//! 2. `_trace` calls `Foo::trace()` (an implementation of `JSTraceable`).
|
||||||
//! defined in `InheritTypes.rs`).
|
//! This is typically derived via a #[jstraceable] annotation
|
||||||
//! 3. `Foo::trace()` calls `Foo::encode()` (an implementation of `Encodable`).
|
//! 3. For all fields (except those wrapped in `Untraceable`), `Foo::trace()`
|
||||||
//! This implementation is typically derived by a `#[deriving(Encodable)]`
|
//! calls `trace()` on the field.
|
||||||
//! annotation on the Rust struct.
|
//! For example, for fields of type `JS<T>`, `JS<T>::trace()` calls
|
||||||
//! 4. For all fields (except those wrapped in `Untraceable`), `Foo::encode()`
|
|
||||||
//! calls `encode()` on the field.
|
|
||||||
//!
|
|
||||||
//! For example, for fields of type `JS<T>`, `JS<T>::encode()` calls
|
|
||||||
//! `trace_reflector()`.
|
//! `trace_reflector()`.
|
||||||
//! 6. `trace_reflector()` calls `trace_object()` with the `JSObject` for the
|
//! 4. `trace_reflector()` calls `trace_object()` with the `JSObject` for the
|
||||||
//! reflector.
|
//! reflector.
|
||||||
//! 7. `trace_object()` calls `JS_CallTracer()` to notify the GC, which will
|
//! 5. `trace_object()` calls `JS_CallTracer()` to notify the GC, which will
|
||||||
//! add the object to the graph, and will trace that object as well.
|
//! add the object to the graph, and will trace that object as well.
|
||||||
|
//!
|
||||||
|
//! The untraceable!() macro adds an empty implementation of JSTraceable to
|
||||||
|
//! a datatype.
|
||||||
|
|
||||||
use dom::bindings::js::JS;
|
use dom::bindings::js::JS;
|
||||||
use dom::bindings::utils::{Reflectable, Reflector};
|
use dom::bindings::utils::{Reflectable, Reflector};
|
||||||
|
|
||||||
use js::jsapi::{JSObject, JSTracer, JS_CallTracer, JSTRACE_OBJECT};
|
use js::jsapi::{JSObject, JSTracer, JS_CallTracer, JSTRACE_OBJECT};
|
||||||
use js::jsval::JSVal;
|
use js::jsval::JSVal;
|
||||||
|
|
||||||
use libc;
|
use libc;
|
||||||
use std::mem;
|
use std::rc::Rc;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use serialize::{Encodable, Encoder};
|
|
||||||
|
|
||||||
// IMPORTANT: We rely on the fact that we never attempt to encode DOM objects using
|
use url::Url;
|
||||||
// any encoder but JSTracer. Since we derive trace hooks automatically,
|
use servo_util::atom::Atom;
|
||||||
// we are unfortunately required to use generic types everywhere and
|
use servo_util::namespace::Namespace;
|
||||||
// unsafely cast to the concrete JSTracer we actually require.
|
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData};
|
||||||
|
use net::image_cache_task::ImageCacheTask;
|
||||||
|
use script_traits::ScriptControlChan;
|
||||||
|
use std::collections::hashmap::HashMap;
|
||||||
|
use collections::hash::Hash;
|
||||||
|
use style::PropertyDeclarationBlock;
|
||||||
|
|
||||||
fn get_jstracer<'a, S: Encoder<E>, E>(s: &'a mut S) -> &'a mut JSTracer {
|
impl<T: Reflectable> JSTraceable for JS<T> {
|
||||||
unsafe {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
mem::transmute(s)
|
trace_reflector(trc, "", self.reflector());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Reflectable+Encodable<S, E>, S: Encoder<E>, E> Encodable<S, E> for JS<T> {
|
untraceable!(Reflector)
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
|
||||||
trace_reflector(get_jstracer(s), "", self.reflector());
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<S: Encoder<E>, E> Encodable<S, E> for Reflector {
|
|
||||||
fn encode(&self, _s: &mut S) -> Result<(), E> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A trait to allow tracing (only) DOM objects.
|
/// A trait to allow tracing (only) DOM objects.
|
||||||
pub trait JSTraceable {
|
pub trait JSTraceable {
|
||||||
|
@ -120,12 +111,6 @@ impl<T> Untraceable<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E, T> Encodable<S, E> for Untraceable<T> {
|
|
||||||
fn encode(&self, _s: &mut S) -> Result<(), E> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T> Deref<T> for Untraceable<T> {
|
impl<T> Deref<T> for Untraceable<T> {
|
||||||
fn deref<'a>(&'a self) -> &'a T {
|
fn deref<'a>(&'a self) -> &'a T {
|
||||||
&self.inner
|
&self.inner
|
||||||
|
@ -165,28 +150,90 @@ impl<T> Deref<T> for Traceable<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E, T: Encodable<S, E>> Encodable<S, E> for Traceable<RefCell<T>> {
|
impl<T: JSTraceable> JSTraceable for RefCell<T> {
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
self.borrow().encode(s)
|
self.borrow().trace(trc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E, T: Encodable<S, E>+Copy> Encodable<S, E> for Traceable<Cell<T>> {
|
impl<T: JSTraceable> JSTraceable for Rc<T> {
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
self.deref().get().encode(s)
|
self.deref().trace(trc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E> Encodable<S, E> for Traceable<*mut JSObject> {
|
impl<T: JSTraceable> JSTraceable for Box<T> {
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
trace_object(get_jstracer(s), "object", **self);
|
(**self).trace(trc)
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E> Encodable<S, E> for Traceable<JSVal> {
|
impl<T: JSTraceable+Copy> JSTraceable for Traceable<Cell<T>> {
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
trace_jsval(get_jstracer(s), "val", **self);
|
self.deref().get().trace(trc)
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
impl<T: JSTraceable+Copy> JSTraceable for Cell<T> {
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
self.get().trace(trc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl JSTraceable for Traceable<*mut JSObject> {
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
trace_object(trc, "object", **self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl JSTraceable for Traceable<JSVal> {
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
trace_jsval(trc, "val", **self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXXManishearth Check if the following three are optimized to no-ops
|
||||||
|
// if e.trace() is a no-op (e.g it is an untraceable type)
|
||||||
|
impl<T: JSTraceable> JSTraceable for Vec<T> {
|
||||||
|
#[inline]
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
for e in self.iter() {
|
||||||
|
e.trace(trc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T: JSTraceable> JSTraceable for Option<T> {
|
||||||
|
#[inline]
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
self.as_ref().map(|e| e.trace(trc));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<K: Eq+Hash, V: JSTraceable> JSTraceable for HashMap<K, V> {
|
||||||
|
#[inline]
|
||||||
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
for e in self.iter() {
|
||||||
|
e.val1().trace(trc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
untraceable!(bool, f32, f64, String, Url)
|
||||||
|
untraceable!(uint, u8, u16, u32, u64)
|
||||||
|
untraceable!(int, i8, i16, i32, i64)
|
||||||
|
untraceable!(Untraceable<T>)
|
||||||
|
untraceable!(ImageCacheTask, ScriptControlChan)
|
||||||
|
untraceable!(Atom, Namespace)
|
||||||
|
untraceable!(PropertyDeclarationBlock)
|
||||||
|
// These three are interdependent, if you plan to put jsmanaged data
|
||||||
|
// in one of these make sure it is propagated properly to containing structs
|
||||||
|
untraceable!(SubpageId, WindowSizeData, PipelineId)
|
||||||
|
|
||||||
|
impl<'a> JSTraceable for &'a str {
|
||||||
|
#[inline]
|
||||||
|
fn trace(&self, _: *mut JSTracer) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
}
|
|
@ -52,7 +52,7 @@ use js::{JSFUN_CONSTRUCTOR, JSPROP_READONLY};
|
||||||
use js;
|
use js;
|
||||||
|
|
||||||
#[allow(raw_pointer_deriving)]
|
#[allow(raw_pointer_deriving)]
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub struct GlobalStaticData {
|
pub struct GlobalStaticData {
|
||||||
pub windowproxy_handler: Untraceable<*const libc::c_void>,
|
pub windowproxy_handler: Untraceable<*const libc::c_void>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,13 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::bindings::error::Fallible;
|
use dom::bindings::error::Fallible;
|
||||||
use dom::bindings::codegen::Bindings::BlobBinding;
|
use dom::bindings::codegen::Bindings::BlobBinding;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub enum BlobType {
|
pub enum BlobType {
|
||||||
BlobTypeId,
|
BlobTypeId,
|
||||||
FileTypeId
|
FileTypeId
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Blob {
|
pub struct Blob {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -16,7 +16,7 @@ use libc::c_void;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
#[allow(raw_pointer_deriving)]
|
#[allow(raw_pointer_deriving)]
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub struct BrowserContext {
|
pub struct BrowserContext {
|
||||||
history: Vec<SessionHistoryEntry>,
|
history: Vec<SessionHistoryEntry>,
|
||||||
active_index: uint,
|
active_index: uint,
|
||||||
|
@ -66,7 +66,7 @@ impl BrowserContext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct SessionHistoryEntry {
|
pub struct SessionHistoryEntry {
|
||||||
document: JS<Document>,
|
document: JS<Document>,
|
||||||
|
|
|
@ -16,7 +16,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)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct CanvasRenderingContext2D {
|
pub struct CanvasRenderingContext2D {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -17,7 +17,7 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct CharacterData {
|
pub struct CharacterData {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
|
|
@ -16,7 +16,7 @@ use dom::node::{CommentNodeTypeId, Node};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
/// An HTML comment.
|
/// An HTML comment.
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Comment {
|
pub struct Comment {
|
||||||
pub characterdata: CharacterData,
|
pub characterdata: CharacterData,
|
||||||
|
|
|
@ -9,7 +9,7 @@ use dom::bindings::js::{JSRef, Temporary};
|
||||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Console {
|
pub struct Console {
|
||||||
pub reflector_: Reflector
|
pub reflector_: Reflector
|
||||||
|
|
|
@ -18,7 +18,7 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct CustomEvent {
|
pub struct CustomEvent {
|
||||||
event: Event,
|
event: Event,
|
||||||
|
|
|
@ -36,7 +36,7 @@ use std::task::TaskBuilder;
|
||||||
use native::task::NativeTaskBuilder;
|
use native::task::NativeTaskBuilder;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DedicatedWorkerGlobalScope {
|
pub struct DedicatedWorkerGlobalScope {
|
||||||
workerglobalscope: WorkerGlobalScope,
|
workerglobalscope: WorkerGlobalScope,
|
||||||
|
|
|
@ -65,13 +65,14 @@ use std::cell::{Cell, RefCell};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use time;
|
use time;
|
||||||
|
|
||||||
#[deriving(PartialEq,Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum IsHTMLDocument {
|
pub enum IsHTMLDocument {
|
||||||
HTMLDocument,
|
HTMLDocument,
|
||||||
NonHTMLDocument,
|
NonHTMLDocument,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
@ -100,6 +101,7 @@ impl DocumentDerived for EventTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct ImagesFilter;
|
struct ImagesFilter;
|
||||||
impl CollectionFilter for ImagesFilter {
|
impl CollectionFilter for ImagesFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -107,6 +109,7 @@ impl CollectionFilter for ImagesFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct EmbedsFilter;
|
struct EmbedsFilter;
|
||||||
impl CollectionFilter for EmbedsFilter {
|
impl CollectionFilter for EmbedsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -114,6 +117,7 @@ impl CollectionFilter for EmbedsFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct LinksFilter;
|
struct LinksFilter;
|
||||||
impl CollectionFilter for LinksFilter {
|
impl CollectionFilter for LinksFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -121,6 +125,7 @@ impl CollectionFilter for LinksFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct FormsFilter;
|
struct FormsFilter;
|
||||||
impl CollectionFilter for FormsFilter {
|
impl CollectionFilter for FormsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -128,6 +133,7 @@ impl CollectionFilter for FormsFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct ScriptsFilter;
|
struct ScriptsFilter;
|
||||||
impl CollectionFilter for ScriptsFilter {
|
impl CollectionFilter for ScriptsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -135,6 +141,7 @@ impl CollectionFilter for ScriptsFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct AnchorsFilter;
|
struct AnchorsFilter;
|
||||||
impl CollectionFilter for AnchorsFilter {
|
impl CollectionFilter for AnchorsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
@ -142,6 +149,7 @@ impl CollectionFilter for AnchorsFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct AppletsFilter;
|
struct AppletsFilter;
|
||||||
impl CollectionFilter for AppletsFilter {
|
impl CollectionFilter for AppletsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::node::{DocumentFragmentNodeTypeId, Node, NodeHelpers, window_from_node}
|
||||||
use dom::nodelist::NodeList;
|
use dom::nodelist::NodeList;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DocumentFragment {
|
pub struct DocumentFragment {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::node::{Node, DoctypeNodeTypeId, NodeHelpers};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
/// The `DOCTYPE` tag.
|
/// The `DOCTYPE` tag.
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DocumentType {
|
pub struct DocumentType {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
|
|
@ -13,7 +13,8 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[repr(uint)]
|
#[repr(uint)]
|
||||||
#[deriving(Show, Encodable)]
|
#[deriving(Show)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum DOMErrorName {
|
pub enum DOMErrorName {
|
||||||
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR as uint,
|
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR as uint,
|
||||||
HierarchyRequestError = DOMExceptionConstants::HIERARCHY_REQUEST_ERR as uint,
|
HierarchyRequestError = DOMExceptionConstants::HIERARCHY_REQUEST_ERR as uint,
|
||||||
|
@ -59,7 +60,7 @@ impl DOMErrorName {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMException {
|
pub struct DOMException {
|
||||||
pub code: DOMErrorName,
|
pub code: DOMErrorName,
|
||||||
|
|
|
@ -22,7 +22,7 @@ use dom::node::Node;
|
||||||
use dom::text::Text;
|
use dom::text::Text;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMImplementation {
|
pub struct DOMImplementation {
|
||||||
document: JS<Document>,
|
document: JS<Document>,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::document::{Document, HTMLDocument, NonHTMLDocument};
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMParser {
|
pub struct DOMParser {
|
||||||
window: JS<Window>, //XXXjdm Document instead?
|
window: JS<Window>, //XXXjdm Document instead?
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
use servo_util::geometry::Au;
|
use servo_util::geometry::Au;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMRect {
|
pub struct DOMRect {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::domrect::DOMRect;
|
use dom::domrect::DOMRect;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMRectList {
|
pub struct DOMRectList {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -16,7 +16,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct DOMTokenList {
|
pub struct DOMTokenList {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
|
|
@ -43,7 +43,7 @@ use std::ascii::StrAsciiExt;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Element {
|
pub struct Element {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
@ -71,7 +71,8 @@ impl Reflectable for Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq,Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum ElementTypeId {
|
pub enum ElementTypeId {
|
||||||
HTMLElementTypeId,
|
HTMLElementTypeId,
|
||||||
HTMLAnchorElementTypeId,
|
HTMLAnchorElementTypeId,
|
||||||
|
|
|
@ -15,7 +15,7 @@ use std::cell::{Cell, RefCell};
|
||||||
|
|
||||||
use time;
|
use time;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub enum EventPhase {
|
pub enum EventPhase {
|
||||||
PhaseNone = EventConstants::NONE as int,
|
PhaseNone = EventConstants::NONE as int,
|
||||||
PhaseCapturing = EventConstants::CAPTURING_PHASE as int,
|
PhaseCapturing = EventConstants::CAPTURING_PHASE as int,
|
||||||
|
@ -23,7 +23,8 @@ pub enum EventPhase {
|
||||||
PhaseBubbling = EventConstants::BUBBLING_PHASE as int,
|
PhaseBubbling = EventConstants::BUBBLING_PHASE as int,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq, Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum EventTypeId {
|
pub enum EventTypeId {
|
||||||
CustomEventTypeId,
|
CustomEventTypeId,
|
||||||
HTMLEventTypeId,
|
HTMLEventTypeId,
|
||||||
|
@ -34,7 +35,7 @@ pub enum EventTypeId {
|
||||||
UIEventTypeId
|
UIEventTypeId
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct Event {
|
pub struct Event {
|
||||||
pub type_id: EventTypeId,
|
pub type_id: EventTypeId,
|
||||||
|
|
|
@ -26,13 +26,15 @@ use url::Url;
|
||||||
|
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
|
|
||||||
#[deriving(PartialEq,Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum ListenerPhase {
|
pub enum ListenerPhase {
|
||||||
Capturing,
|
Capturing,
|
||||||
Bubbling,
|
Bubbling,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq,Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum EventTargetTypeId {
|
pub enum EventTargetTypeId {
|
||||||
NodeTargetTypeId(NodeTypeId),
|
NodeTargetTypeId(NodeTypeId),
|
||||||
WindowTypeId,
|
WindowTypeId,
|
||||||
|
@ -41,7 +43,8 @@ pub enum EventTargetTypeId {
|
||||||
XMLHttpRequestTargetTypeId(XMLHttpRequestId)
|
XMLHttpRequestTargetTypeId(XMLHttpRequestId)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq, Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub enum EventListenerType {
|
pub enum EventListenerType {
|
||||||
Additive(EventListener),
|
Additive(EventListener),
|
||||||
Inline(EventListener),
|
Inline(EventListener),
|
||||||
|
@ -55,13 +58,14 @@ impl EventListenerType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(PartialEq,Encodable)]
|
#[deriving(PartialEq)]
|
||||||
|
#[jstraceable]
|
||||||
pub struct EventListenerEntry {
|
pub struct EventListenerEntry {
|
||||||
pub phase: ListenerPhase,
|
pub phase: ListenerPhase,
|
||||||
pub listener: EventListenerType
|
pub listener: EventListenerType
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct EventTarget {
|
pub struct EventTarget {
|
||||||
pub type_id: EventTargetTypeId,
|
pub type_id: EventTargetTypeId,
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::blob::{Blob, BlobType, FileTypeId};
|
use dom::blob::{Blob, BlobType, FileTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct File {
|
pub struct File {
|
||||||
pub blob: Blob,
|
pub blob: Blob,
|
||||||
|
|
|
@ -18,14 +18,15 @@ use servo_util::str::DOMString;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
|
|
||||||
#[deriving(Encodable, Clone)]
|
#[deriving(Clone)]
|
||||||
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub enum FormDatum {
|
pub enum FormDatum {
|
||||||
StringData(DOMString),
|
StringData(DOMString),
|
||||||
FileData(JS<File>)
|
FileData(JS<File>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct FormData {
|
pub struct FormData {
|
||||||
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
||||||
|
|
|
@ -23,7 +23,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLAnchorElement {
|
pub struct HTMLAnchorElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLAppletElement {
|
pub struct HTMLAppletElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -17,7 +17,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLAreaElement {
|
pub struct HTMLAreaElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlmediaelement::HTMLMediaElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLAudioElement {
|
pub struct HTMLAudioElement {
|
||||||
pub htmlmediaelement: HTMLMediaElement
|
pub htmlmediaelement: HTMLMediaElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLBaseElement {
|
pub struct HTMLBaseElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -20,7 +20,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLBodyElement {
|
pub struct HTMLBodyElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLBRElement {
|
pub struct HTMLBRElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -19,7 +19,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLButtonElement {
|
pub struct HTMLButtonElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -28,7 +28,7 @@ use std::cell::Cell;
|
||||||
static DefaultWidth: u32 = 300;
|
static DefaultWidth: u32 = 300;
|
||||||
static DefaultHeight: u32 = 150;
|
static DefaultHeight: u32 = 150;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLCanvasElement {
|
pub struct HTMLCanvasElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -7,6 +7,7 @@ use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMetho
|
||||||
use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast};
|
use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast};
|
||||||
use dom::bindings::global::Window;
|
use dom::bindings::global::Window;
|
||||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||||
|
use dom::bindings::trace::JSTraceable;
|
||||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::element::{Element, AttributeHandlers, ElementHelpers};
|
use dom::element::{Element, AttributeHandlers, ElementHelpers};
|
||||||
use dom::node::{Node, NodeHelpers};
|
use dom::node::{Node, NodeHelpers};
|
||||||
|
@ -15,27 +16,20 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
|
|
||||||
use serialize::{Encoder, Encodable};
|
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
|
|
||||||
pub trait CollectionFilter {
|
pub trait CollectionFilter : JSTraceable {
|
||||||
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool;
|
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter+'static> {
|
#[jstraceable]
|
||||||
fn encode(&self, _s: &mut S) -> Result<(), E> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub enum CollectionTypeId {
|
pub enum CollectionTypeId {
|
||||||
Static(Vec<JS<Element>>),
|
Static(Vec<JS<Element>>),
|
||||||
Live(JS<Node>, Box<CollectionFilter+'static>)
|
Live(JS<Node>, Box<CollectionFilter+'static>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLCollection {
|
pub struct HTMLCollection {
|
||||||
collection: CollectionTypeId,
|
collection: CollectionTypeId,
|
||||||
|
@ -64,6 +58,7 @@ impl HTMLCollection {
|
||||||
|
|
||||||
fn all_elements(window: JSRef<Window>, root: JSRef<Node>,
|
fn all_elements(window: JSRef<Window>, root: JSRef<Node>,
|
||||||
namespace_filter: Option<Namespace>) -> Temporary<HTMLCollection> {
|
namespace_filter: Option<Namespace>) -> Temporary<HTMLCollection> {
|
||||||
|
#[jstraceable]
|
||||||
struct AllElementFilter {
|
struct AllElementFilter {
|
||||||
namespace_filter: Option<Namespace>
|
namespace_filter: Option<Namespace>
|
||||||
}
|
}
|
||||||
|
@ -85,6 +80,7 @@ impl HTMLCollection {
|
||||||
return HTMLCollection::all_elements(window, root, None);
|
return HTMLCollection::all_elements(window, root, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[jstraceable]
|
||||||
struct TagNameFilter {
|
struct TagNameFilter {
|
||||||
tag: Atom,
|
tag: Atom,
|
||||||
ascii_lower_tag: Atom,
|
ascii_lower_tag: Atom,
|
||||||
|
@ -115,6 +111,7 @@ impl HTMLCollection {
|
||||||
if tag.as_slice() == "*" {
|
if tag.as_slice() == "*" {
|
||||||
return HTMLCollection::all_elements(window, root, namespace_filter);
|
return HTMLCollection::all_elements(window, root, namespace_filter);
|
||||||
}
|
}
|
||||||
|
#[jstraceable]
|
||||||
struct TagNameNSFilter {
|
struct TagNameNSFilter {
|
||||||
tag: Atom,
|
tag: Atom,
|
||||||
namespace_filter: Option<Namespace>
|
namespace_filter: Option<Namespace>
|
||||||
|
@ -139,6 +136,7 @@ impl HTMLCollection {
|
||||||
|
|
||||||
pub fn by_class_name(window: JSRef<Window>, root: JSRef<Node>, classes: DOMString)
|
pub fn by_class_name(window: JSRef<Window>, root: JSRef<Node>, classes: DOMString)
|
||||||
-> Temporary<HTMLCollection> {
|
-> Temporary<HTMLCollection> {
|
||||||
|
#[jstraceable]
|
||||||
struct ClassNameFilter {
|
struct ClassNameFilter {
|
||||||
classes: Vec<DOMString>
|
classes: Vec<DOMString>
|
||||||
}
|
}
|
||||||
|
@ -154,6 +152,7 @@ impl HTMLCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn children(window: JSRef<Window>, root: JSRef<Node>) -> Temporary<HTMLCollection> {
|
pub fn children(window: JSRef<Window>, root: JSRef<Node>) -> Temporary<HTMLCollection> {
|
||||||
|
#[jstraceable]
|
||||||
struct ElementChildFilter;
|
struct ElementChildFilter;
|
||||||
impl CollectionFilter for ElementChildFilter {
|
impl CollectionFilter for ElementChildFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLDataElement {
|
pub struct HTMLDataElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -16,7 +16,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLDataListElement {
|
pub struct HTMLDataListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
@ -44,6 +44,7 @@ impl HTMLDataListElement {
|
||||||
|
|
||||||
impl<'a> HTMLDataListElementMethods for JSRef<'a, HTMLDataListElement> {
|
impl<'a> HTMLDataListElementMethods for JSRef<'a, HTMLDataListElement> {
|
||||||
fn Options(self) -> Temporary<HTMLCollection> {
|
fn Options(self) -> Temporary<HTMLCollection> {
|
||||||
|
#[jstraceable]
|
||||||
struct HTMLDataListOptionsFilter;
|
struct HTMLDataListOptionsFilter;
|
||||||
impl CollectionFilter for HTMLDataListOptionsFilter {
|
impl CollectionFilter for HTMLDataListOptionsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, _root: JSRef<Node>) -> bool {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLDirectoryElement {
|
pub struct HTMLDirectoryElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLDivElement {
|
pub struct HTMLDivElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLDListElement {
|
pub struct HTMLDListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -21,7 +21,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLElement {
|
pub struct HTMLElement {
|
||||||
pub element: Element
|
pub element: Element
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLEmbedElement {
|
pub struct HTMLEmbedElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -21,7 +21,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::{DOMString, StaticStringVec};
|
use servo_util::str::{DOMString, StaticStringVec};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLFieldSetElement {
|
pub struct HTMLFieldSetElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
@ -50,6 +50,7 @@ impl HTMLFieldSetElement {
|
||||||
impl<'a> HTMLFieldSetElementMethods for JSRef<'a, HTMLFieldSetElement> {
|
impl<'a> HTMLFieldSetElementMethods for JSRef<'a, HTMLFieldSetElement> {
|
||||||
// http://www.whatwg.org/html/#dom-fieldset-elements
|
// http://www.whatwg.org/html/#dom-fieldset-elements
|
||||||
fn Elements(self) -> Temporary<HTMLCollection> {
|
fn Elements(self) -> Temporary<HTMLCollection> {
|
||||||
|
#[jstraceable]
|
||||||
struct ElementsFilter;
|
struct ElementsFilter;
|
||||||
impl CollectionFilter for ElementsFilter {
|
impl CollectionFilter for ElementsFilter {
|
||||||
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
|
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool {
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLFontElement {
|
pub struct HTMLFontElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLFormElement {
|
pub struct HTMLFormElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLFrameElement {
|
pub struct HTMLFrameElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLFrameSetElement {
|
pub struct HTMLFrameSetElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLHeadElement {
|
pub struct HTMLHeadElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub enum HeadingLevel {
|
pub enum HeadingLevel {
|
||||||
Heading1,
|
Heading1,
|
||||||
Heading2,
|
Heading2,
|
||||||
|
@ -23,7 +23,7 @@ pub enum HeadingLevel {
|
||||||
Heading6,
|
Heading6,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLHeadingElement {
|
pub struct HTMLHeadingElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLHRElement {
|
pub struct HTMLHRElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLHtmlElement {
|
pub struct HTMLHtmlElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -41,7 +41,7 @@ enum SandboxAllowance {
|
||||||
AllowPopups = 0x20
|
AllowPopups = 0x20
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLIFrameElement {
|
pub struct HTMLIFrameElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
@ -55,7 +55,7 @@ impl HTMLIFrameElementDerived for EventTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
pub struct IFrameSize {
|
pub struct IFrameSize {
|
||||||
pub pipeline_id: PipelineId,
|
pub pipeline_id: PipelineId,
|
||||||
pub subpage_id: SubpageId,
|
pub subpage_id: SubpageId,
|
||||||
|
|
|
@ -25,7 +25,7 @@ use url::{Url, UrlParser};
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLImageElement {
|
pub struct HTMLImageElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLInputElement {
|
pub struct HTMLInputElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLLabelElement {
|
pub struct HTMLLabelElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLLegendElement {
|
pub struct HTMLLegendElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLLIElement {
|
pub struct HTMLLIElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -22,7 +22,7 @@ use servo_util::namespace::Null;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use url::UrlParser;
|
use url::UrlParser;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLLinkElement {
|
pub struct HTMLLinkElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLMapElement {
|
pub struct HTMLMapElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -12,7 +12,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::ElementNodeTypeId;
|
use dom::node::ElementNodeTypeId;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLMediaElement {
|
pub struct HTMLMediaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLMetaElement {
|
pub struct HTMLMetaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLMeterElement {
|
pub struct HTMLMeterElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLModElement {
|
pub struct HTMLModElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -26,7 +26,7 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLObjectElement {
|
pub struct HTMLObjectElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLOListElement {
|
pub struct HTMLOListElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLOptGroupElement {
|
pub struct HTMLOptGroupElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -23,7 +23,7 @@ use servo_util::atom::Atom;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLOptionElement {
|
pub struct HTMLOptionElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -15,7 +15,7 @@ use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLOutputElement {
|
pub struct HTMLOutputElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLParagraphElement {
|
pub struct HTMLParagraphElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLParamElement {
|
pub struct HTMLParamElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLPreElement {
|
pub struct HTMLPreElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLProgressElement {
|
pub struct HTMLProgressElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLQuoteElement {
|
pub struct HTMLQuoteElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -19,7 +19,7 @@ use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use servo_util::namespace::Null;
|
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)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLScriptElement {
|
pub struct HTMLScriptElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -21,7 +21,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLSelectElement {
|
pub struct HTMLSelectElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLSourceElement {
|
pub struct HTMLSourceElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLSpanElement {
|
pub struct HTMLSpanElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -17,7 +17,7 @@ use layout_interface::{AddStylesheetMsg, LayoutChan};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
use style::Stylesheet;
|
use style::Stylesheet;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLStyleElement {
|
pub struct HTMLStyleElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableCaptionElement {
|
pub struct HTMLTableCaptionElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -12,7 +12,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::ElementNodeTypeId;
|
use dom::node::ElementNodeTypeId;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableCellElement {
|
pub struct HTMLTableCellElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableColElement {
|
pub struct HTMLTableColElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmltablecellelement::HTMLTableCellElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableDataCellElement {
|
pub struct HTMLTableDataCellElement {
|
||||||
pub htmltablecellelement: HTMLTableCellElement,
|
pub htmltablecellelement: HTMLTableCellElement,
|
||||||
|
|
|
@ -17,7 +17,7 @@ use dom::htmltablecaptionelement::HTMLTableCaptionElement;
|
||||||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableElement {
|
pub struct HTMLTableElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmltablecellelement::HTMLTableCellElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableHeaderCellElement {
|
pub struct HTMLTableHeaderCellElement {
|
||||||
pub htmltablecellelement: HTMLTableCellElement,
|
pub htmltablecellelement: HTMLTableCellElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableRowElement {
|
pub struct HTMLTableRowElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTableSectionElement {
|
pub struct HTMLTableSectionElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTemplateElement {
|
pub struct HTMLTemplateElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_util::atom::Atom;
|
use servo_util::atom::Atom;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTextAreaElement {
|
pub struct HTMLTextAreaElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTimeElement {
|
pub struct HTMLTimeElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
|
@ -16,7 +16,7 @@ use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use dom::text::Text;
|
use dom::text::Text;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTitleElement {
|
pub struct HTMLTitleElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLTrackElement {
|
pub struct HTMLTrackElement {
|
||||||
pub htmlelement: HTMLElement,
|
pub htmlelement: HTMLElement,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId};
|
use dom::node::{Node, ElementNodeTypeId};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
pub struct HTMLUListElement {
|
pub struct HTMLUListElement {
|
||||||
pub htmlelement: HTMLElement
|
pub htmlelement: HTMLElement
|
||||||
|
|
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