aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script')
-rw-r--r--src/components/script/dom/bindings/codegen/Bindings.conf1
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLUnknownElement.webidl16
-rw-r--r--src/components/script/dom/bindings/element.rs2
-rw-r--r--src/components/script/dom/bindings/node.rs1
-rw-r--r--src/components/script/dom/element.rs3
-rw-r--r--src/components/script/dom/htmlunknownelement.rs9
-rw-r--r--src/components/script/html/hubbub_html_parser.rs5
-rw-r--r--src/components/script/script.rc1
8 files changed, 35 insertions, 3 deletions
diff --git a/src/components/script/dom/bindings/codegen/Bindings.conf b/src/components/script/dom/bindings/codegen/Bindings.conf
index 20fbbac8ed9..a0c343ca4a8 100644
--- a/src/components/script/dom/bindings/codegen/Bindings.conf
+++ b/src/components/script/dom/bindings/codegen/Bindings.conf
@@ -611,6 +611,7 @@ addHTMLElement('HTMLTextAreaElement')
addHTMLElement('HTMLTimeElement')
addHTMLElement('HTMLTitleElement')
addHTMLElement('HTMLUListElement')
+addHTMLElement('HTMLUnknownElement')
# If you add one of these, you need to make sure nsDOMQS.h has the relevant
# macros added for it
diff --git a/src/components/script/dom/bindings/codegen/HTMLUnknownElement.webidl b/src/components/script/dom/bindings/codegen/HTMLUnknownElement.webidl
new file mode 100644
index 00000000000..db1307ae714
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLUnknownElement.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * http://www.whatwg.org/specs/web-apps/current-work/ and
+ * http://dev.w3.org/csswg/cssom-view/
+ *
+ * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
+ * Opera Software ASA. You are granted a license to use, reproduce
+ * and create derivative works of this document.
+ */
+
+interface HTMLUnknownElement : HTMLElement {
+};
diff --git a/src/components/script/dom/bindings/element.rs b/src/components/script/dom/bindings/element.rs
index 2df2ec0a3b9..6e7196b4649 100644
--- a/src/components/script/dom/bindings/element.rs
+++ b/src/components/script/dom/bindings/element.rs
@@ -445,3 +445,5 @@ generate_cacheable_wrapper!(HTMLTimeElement, HTMLTimeElementBinding::Wrap)
generate_binding_object!(HTMLTimeElement)
generate_cacheable_wrapper!(HTMLUListElement, HTMLUListElementBinding::Wrap)
generate_binding_object!(HTMLUListElement)
+generate_cacheable_wrapper!(HTMLUnknownElement, HTMLUnknownElementBinding::Wrap)
+generate_binding_object!(HTMLUnknownElement)
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs
index 47c32742342..db54fb6537c 100644
--- a/src/components/script/dom/bindings/node.rs
+++ b/src/components/script/dom/bindings/node.rs
@@ -128,6 +128,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
ElementNodeTypeId(HTMLTimeElementTypeId) => generate_element!(HTMLTimeElement),
ElementNodeTypeId(HTMLTitleElementTypeId) => generate_element!(HTMLTitleElement),
ElementNodeTypeId(HTMLUListElementTypeId) => generate_element!(HTMLUListElement),
+ ElementNodeTypeId(HTMLUnknownElementTypeId) => generate_element!(HTMLUnknownElement),
ElementNodeTypeId(_) => element::create(cx, node).ptr,
CommentNodeTypeId |
DoctypeNodeTypeId => text::create(cx, node).ptr,
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs
index 3799e751f0f..5ebfe1503cb 100644
--- a/src/components/script/dom/element.rs
+++ b/src/components/script/dom/element.rs
@@ -105,7 +105,7 @@ pub enum ElementTypeId {
HTMLTimeElementTypeId,
HTMLTitleElementTypeId,
HTMLUListElementTypeId,
- UnknownElementTypeId,
+ HTMLUnknownElementTypeId,
}
//
@@ -113,7 +113,6 @@ pub enum ElementTypeId {
//
pub struct HTMLSmallElement { parent: HTMLElement }
-pub struct UnknownElement { parent: HTMLElement }
//
// Element methods
diff --git a/src/components/script/dom/htmlunknownelement.rs b/src/components/script/dom/htmlunknownelement.rs
new file mode 100644
index 00000000000..a0ef96a08ee
--- /dev/null
+++ b/src/components/script/dom/htmlunknownelement.rs
@@ -0,0 +1,9 @@
+/* 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 dom::htmlelement::HTMLElement;
+
+pub struct HTMLUnknownElement {
+ parent: HTMLElement
+}
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index 61c2d7c5748..2d9803d9670 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -258,7 +258,10 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
handle_htmlelement!(cx, tag, "section", HTMLElementTypeId, HTMLElement);
unsafe {
- Node::as_abstract_node(cx, @Element::new(UnknownElementTypeId, tag.to_str()))
+ let element = @HTMLUnknownElement {
+ parent: HTMLElement::new(HTMLUnknownElementTypeId, tag.to_str())
+ };
+ Node::as_abstract_node(cx, element)
}
}
diff --git a/src/components/script/script.rc b/src/components/script/script.rc
index ac3e4d14148..af4b60910d6 100644
--- a/src/components/script/script.rc
+++ b/src/components/script/script.rc
@@ -113,6 +113,7 @@ pub mod dom {
pub mod htmltimeelement;
pub mod htmltitleelement;
pub mod htmlulistelement;
+ pub mod htmlunknownelement;
pub mod mouseevent;
pub mod node;
pub mod uievent;