aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2013-08-28 17:53:36 -0400
committerJosh Matthews <josh@joshmatthews.net>2013-08-28 17:53:36 -0400
commite26a541eb2bc772c68e2a2adae2d7622823831fd (patch)
treeb9de0ca43547a24ffbf9657ba6c61e9b6a8cb301 /src
parent8693459b2885b435a231c1c1686786bba30d8a6a (diff)
downloadservo-e26a541eb2bc772c68e2a2adae2d7622823831fd.tar.gz
servo-e26a541eb2bc772c68e2a2adae2d7622823831fd.zip
Generate bindings for HTMLParamElement.
Diffstat (limited to 'src')
-rw-r--r--src/components/script/dom/bindings/codegen/Bindings.conf1
-rw-r--r--src/components/script/dom/bindings/codegen/HTMLParamElement.webidl29
-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.rs1
-rw-r--r--src/components/script/dom/htmlparamelement.rs40
-rw-r--r--src/components/script/html/hubbub_html_parser.rs1
-rw-r--r--src/components/script/script.rc1
8 files changed, 76 insertions, 0 deletions
diff --git a/src/components/script/dom/bindings/codegen/Bindings.conf b/src/components/script/dom/bindings/codegen/Bindings.conf
index 94612333bce..2e0debceb71 100644
--- a/src/components/script/dom/bindings/codegen/Bindings.conf
+++ b/src/components/script/dom/bindings/codegen/Bindings.conf
@@ -593,6 +593,7 @@ addHTMLElement('HTMLOptGroupElement')
addHTMLElement('HTMLOptionElement')
addHTMLElement('HTMLOutputElement')
addHTMLElement('HTMLParagraphElement')
+addHTMLElement('HTMLParamElement')
addHTMLElement('HTMLProgressElement')
addHTMLElement('HTMLQuoteElement')
addHTMLElement('HTMLScriptElement')
diff --git a/src/components/script/dom/bindings/codegen/HTMLParamElement.webidl b/src/components/script/dom/bindings/codegen/HTMLParamElement.webidl
new file mode 100644
index 00000000000..e2c7e8d7fab
--- /dev/null
+++ b/src/components/script/dom/bindings/codegen/HTMLParamElement.webidl
@@ -0,0 +1,29 @@
+/* -*- 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/#the-param-element
+ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+ *
+ * © 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.
+ */
+
+// http://www.whatwg.org/specs/web-apps/current-work/#the-param-element
+interface HTMLParamElement : HTMLElement {
+ [SetterThrows, Pure]
+ attribute DOMString name;
+ [SetterThrows, Pure]
+ attribute DOMString value;
+};
+
+// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
+partial interface HTMLParamElement {
+ [SetterThrows, Pure]
+ attribute DOMString type;
+ [SetterThrows, Pure]
+ attribute DOMString valueType;
+};
diff --git a/src/components/script/dom/bindings/element.rs b/src/components/script/dom/bindings/element.rs
index f1e25725566..9f3e6c209da 100644
--- a/src/components/script/dom/bindings/element.rs
+++ b/src/components/script/dom/bindings/element.rs
@@ -409,6 +409,8 @@ generate_cacheable_wrapper!(HTMLOutputElement, HTMLOutputElementBinding::Wrap)
generate_binding_object!(HTMLOutputElement)
generate_cacheable_wrapper!(HTMLParagraphElement, HTMLParagraphElementBinding::Wrap)
generate_binding_object!(HTMLParagraphElement)
+generate_cacheable_wrapper!(HTMLParamElement, HTMLParamElementBinding::Wrap)
+generate_binding_object!(HTMLParamElement)
generate_cacheable_wrapper!(HTMLProgressElement, HTMLProgressElementBinding::Wrap)
generate_binding_object!(HTMLProgressElement)
generate_cacheable_wrapper!(HTMLQuoteElement, HTMLQuoteElementBinding::Wrap)
diff --git a/src/components/script/dom/bindings/node.rs b/src/components/script/dom/bindings/node.rs
index 0918aaf0e91..0fdbf00901b 100644
--- a/src/components/script/dom/bindings/node.rs
+++ b/src/components/script/dom/bindings/node.rs
@@ -110,6 +110,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
ElementNodeTypeId(HTMLOptionElementTypeId) => generate_element!(HTMLOptionElement),
ElementNodeTypeId(HTMLOutputElementTypeId) => generate_element!(HTMLOutputElement),
ElementNodeTypeId(HTMLParagraphElementTypeId) => generate_element!(HTMLParagraphElement),
+ ElementNodeTypeId(HTMLParamElementTypeId) => generate_element!(HTMLParamElement),
ElementNodeTypeId(HTMLProgressElementTypeId) => generate_element!(HTMLProgressElement),
ElementNodeTypeId(HTMLQuoteElementTypeId) => generate_element!(HTMLQuoteElement),
ElementNodeTypeId(HTMLScriptElementTypeId) => generate_element!(HTMLScriptElement),
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs
index be373fae8ae..22d00310b13 100644
--- a/src/components/script/dom/element.rs
+++ b/src/components/script/dom/element.rs
@@ -86,6 +86,7 @@ pub enum ElementTypeId {
HTMLOptionElementTypeId,
HTMLOutputElementTypeId,
HTMLParagraphElementTypeId,
+ HTMLParamElementTypeId,
HTMLProgressElementTypeId,
HTMLQuoteElementTypeId,
HTMLScriptElementTypeId,
diff --git a/src/components/script/dom/htmlparamelement.rs b/src/components/script/dom/htmlparamelement.rs
new file mode 100644
index 00000000000..3ec1e4ee798
--- /dev/null
+++ b/src/components/script/dom/htmlparamelement.rs
@@ -0,0 +1,40 @@
+/* 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::bindings::utils::{DOMString, ErrorResult, null_string};
+use dom::htmlelement::HTMLElement;
+
+pub struct HTMLParamElement {
+ parent: HTMLElement
+}
+
+impl HTMLParamElement {
+ pub fn Name(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Value(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn Type(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
+ }
+
+ pub fn ValueType(&self) -> DOMString {
+ null_string
+ }
+
+ pub fn SetValueType(&mut self, _value_type: &DOMString, _rv: &mut ErrorResult) {
+ }
+} \ No newline at end of file
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index 93df39cc3d6..61c2d7c5748 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -220,6 +220,7 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
handle_element!(cx, tag, "optgroup",HTMLOptGroupElementTypeId, HTMLOptGroupElement, []);
handle_element!(cx, tag, "output", HTMLOutputElementTypeId, HTMLOutputElement, []);
handle_element!(cx, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
+ handle_element!(cx, tag, "param", HTMLParamElementTypeId, HTMLParamElement, []);
handle_element!(cx, tag, "progress",HTMLProgressElementTypeId, HTMLProgressElement, []);
handle_element!(cx, tag, "q", HTMLQuoteElementTypeId, HTMLQuoteElement, []);
handle_element!(cx, tag, "script", HTMLScriptElementTypeId, HTMLScriptElement, []);
diff --git a/src/components/script/script.rc b/src/components/script/script.rc
index 93857862eb1..9b89a77a1f5 100644
--- a/src/components/script/script.rc
+++ b/src/components/script/script.rc
@@ -95,6 +95,7 @@ pub mod dom {
pub mod htmloptionelement;
pub mod htmloutputelement;
pub mod htmlparagraphelement;
+ pub mod htmlparamelement;
pub mod htmlprogresselement;
pub mod htmlquoteelement;
pub mod htmlscriptelement;