aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-11-02 11:46:50 +0100
committerMs2ger <ms2ger@gmail.com>2013-11-02 11:46:50 +0100
commitd8198249ecec1c56cf258b7092127105b7136ae9 (patch)
tree6eaa6dd348cc1092e6df94a43476fa56132e71bb /src
parent5bfc044ee47bc8baf9df69d9d2827739523f8427 (diff)
downloadservo-d8198249ecec1c56cf258b7092127105b7136ae9.tar.gz
servo-d8198249ecec1c56cf258b7092127105b7136ae9.zip
Introduce HTMLFrameSetElement::new.
Diffstat (limited to 'src')
-rw-r--r--src/components/script/dom/htmlframesetelement.rs17
-rw-r--r--src/components/script/html/hubbub_html_parser.rs2
2 files changed, 18 insertions, 1 deletions
diff --git a/src/components/script/dom/htmlframesetelement.rs b/src/components/script/dom/htmlframesetelement.rs
index 1e9231ce82d..df25a03e7e3 100644
--- a/src/components/script/dom/htmlframesetelement.rs
+++ b/src/components/script/dom/htmlframesetelement.rs
@@ -2,14 +2,31 @@
* 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::codegen::HTMLFrameSetElementBinding;
use dom::bindings::utils::{DOMString, ErrorResult};
+use dom::document::AbstractDocument;
+use dom::element::HTMLFrameSetElementTypeId;
use dom::htmlelement::HTMLElement;
+use dom::node::{AbstractNode, Node, ScriptView};
pub struct HTMLFrameSetElement {
htmlelement: HTMLElement
}
impl HTMLFrameSetElement {
+ pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLFrameSetElement {
+ HTMLFrameSetElement {
+ htmlelement: HTMLElement::new(HTMLFrameSetElementTypeId, localName, document)
+ }
+ }
+
+ pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
+ let element = HTMLFrameSetElement::new_inherited(localName, document);
+ Node::reflect_node(@mut element, document, HTMLFrameSetElementBinding::Wrap)
+ }
+}
+
+impl HTMLFrameSetElement {
pub fn Cols(&self) -> DOMString {
None
}
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index 444971d83cd..49d9146b3fc 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -227,7 +227,6 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
handle_element!(cx, document, tag, "font", HTMLFontElementTypeId, HTMLFontElement, []);
handle_element!(cx, document, tag, "form", HTMLFormElementTypeId, HTMLFormElement, []);
handle_element!(cx, document, tag, "frame", HTMLFrameElementTypeId, HTMLFrameElement, []);
- handle_element!(cx, document, tag, "frameset",HTMLFrameSetElementTypeId, HTMLFrameSetElement, []);
handle_htmlelement!(cx, document, tag, "aside", HTMLElementTypeId, HTMLElement);
handle_htmlelement!(cx, document, tag, "b", HTMLElementTypeId, HTMLElement);
@@ -240,6 +239,7 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
handle_newable_element!(document, tag, "col", HTMLTableColElement);
handle_newable_element!(document, tag, "colgroup", HTMLTableColElement);
handle_newable_element!(document, tag, "del", HTMLModElement);
+ handle_newable_element!(document, tag, "frameset", HTMLFrameSetElement);
handle_newable_element!(document, tag, "h1", HTMLHeadingElement, Heading1);
handle_newable_element!(document, tag, "h2", HTMLHeadingElement, Heading2);
handle_newable_element!(document, tag, "h3", HTMLHeadingElement, Heading3);