aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/js.rs13
-rw-r--r--components/script/dom/bindings/trace.rs20
-rw-r--r--components/script/dom/create.rs18
3 files changed, 26 insertions, 25 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index 5345d08ee9e..e50bf68e478 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -88,6 +88,12 @@ impl<T: Reflectable> JS<T> {
}
}
+impl<T: Reflectable> JSTraceable for JS<T> {
+ fn trace(&self, trc: *mut JSTracer) {
+ trace_reflector(trc, "", unsafe { (**self.ptr).reflector() });
+ }
+}
+
/// An unrooted reference to a DOM object for use in layout. `Layout*Helpers`
/// traits must be implemented on this.
#[allow_unrooted_interior]
@@ -148,13 +154,6 @@ impl LayoutJS<Node> {
}
}
-impl<T: Reflectable> Reflectable for JS<T> {
- fn reflector(&self) -> &Reflector {
- unsafe {
- (**self.ptr).reflector()
- }
- }
-}
/// A trait to be implemented for JS-managed types that can be stored in
/// mutable member fields.
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index e514e180486..5a9aa5b2abb 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -88,12 +88,6 @@ pub trait JSTraceable {
fn trace(&self, trc: *mut JSTracer);
}
-impl<T: Reflectable> JSTraceable for JS<T> {
- fn trace(&self, trc: *mut JSTracer) {
- trace_reflector(trc, "", self.reflector());
- }
-}
-
no_jsmanaged_fields!(EncodingRef);
no_jsmanaged_fields!(Reflector);
@@ -455,19 +449,17 @@ impl<'a, T: JSTraceable> Drop for RootedTraceable<'a, T> {
}
}
-/// A vector of items that are rooted for the lifetime
-/// of this struct.
-/// Must be a reflectable
+/// A vector of items that are rooted for the lifetime of this struct.
#[allow(unrooted_must_root)]
#[no_move]
#[derive(JSTraceable)]
#[allow_unrooted_interior]
-pub struct RootedVec<T: JSTraceable + Reflectable> {
+pub struct RootedVec<T: JSTraceable> {
v: Vec<T>
}
-impl<T: JSTraceable + Reflectable> RootedVec<T> {
+impl<T: JSTraceable> RootedVec<T> {
/// Create a vector of items of type T that is rooted for
/// the lifetime of this struct
pub fn new() -> RootedVec<T> {
@@ -495,20 +487,20 @@ impl<T: JSTraceable + Reflectable> RootedVec<JS<T>> {
}
}
-impl<T: JSTraceable + Reflectable> Drop for RootedVec<T> {
+impl<T: JSTraceable> Drop for RootedVec<T> {
fn drop(&mut self) {
RootedTraceableSet::remove(self);
}
}
-impl<T: JSTraceable + Reflectable> Deref for RootedVec<T> {
+impl<T: JSTraceable> Deref for RootedVec<T> {
type Target = Vec<T>;
fn deref(&self) -> &Vec<T> {
&self.v
}
}
-impl<T: JSTraceable + Reflectable> DerefMut for RootedVec<T> {
+impl<T: JSTraceable> DerefMut for RootedVec<T> {
fn deref_mut(&mut self) -> &mut Vec<T> {
&mut self.v
}
diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs
index 9b226c73e33..55bef524640 100644
--- a/components/script/dom/create.rs
+++ b/components/script/dom/create.rs
@@ -116,9 +116,13 @@ pub fn create_element(name: QualName, prefix: Option<Atom>,
atom!("base") => make!(HTMLBaseElement),
atom!("bdi") => make!(HTMLElement),
atom!("bdo") => make!(HTMLElement),
- atom!("bgsound") => make!(HTMLElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:bgsound
+ atom!("bgsound") => make!(HTMLUnknownElement),
atom!("big") => make!(HTMLElement),
- atom!("blockquote") => make!(HTMLElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:blink
+ atom!("blink") => make!(HTMLUnknownElement),
+ // https://html.spec.whatwg.org/multipage/#the-blockquote-element
+ atom!("blockquote") => make!(HTMLQuoteElement),
atom!("body") => make!(HTMLBodyElement),
atom!("br") => make!(HTMLBRElement),
atom!("button") => make!(HTMLButtonElement),
@@ -166,7 +170,8 @@ pub fn create_element(name: QualName, prefix: Option<Atom>,
atom!("img") => make!(HTMLImageElement),
atom!("input") => make!(HTMLInputElement),
atom!("ins") => make!(HTMLModElement),
- atom!("isindex") => make!(HTMLElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:isindex-2
+ atom!("isindex") => make!(HTMLUnknownElement),
atom!("kbd") => make!(HTMLElement),
atom!("label") => make!(HTMLLabelElement),
atom!("legend") => make!(HTMLLegendElement),
@@ -178,7 +183,11 @@ pub fn create_element(name: QualName, prefix: Option<Atom>,
atom!("marquee") => make!(HTMLElement),
atom!("meta") => make!(HTMLMetaElement),
atom!("meter") => make!(HTMLMeterElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:multicol
+ atom!("multicol") => make!(HTMLUnknownElement),
atom!("nav") => make!(HTMLElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:nextid
+ atom!("nextid") => make!(HTMLUnknownElement),
atom!("nobr") => make!(HTMLElement),
atom!("noframes") => make!(HTMLElement),
atom!("noscript") => make!(HTMLElement),
@@ -202,7 +211,8 @@ pub fn create_element(name: QualName, prefix: Option<Atom>,
atom!("select") => make!(HTMLSelectElement),
atom!("small") => make!(HTMLElement),
atom!("source") => make!(HTMLSourceElement),
- atom!("spacer") => make!(HTMLElement),
+ // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:spacer
+ atom!("spacer") => make!(HTMLUnknownElement),
atom!("span") => make!(HTMLSpanElement),
atom!("strike") => make!(HTMLElement),
atom!("strong") => make!(HTMLElement),