mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Introduce HTMLUListElement::new.
This commit is contained in:
parent
c9bc5f6409
commit
82e3f71750
2 changed files with 18 additions and 1 deletions
|
@ -2,13 +2,30 @@
|
|||
* 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::HTMLUListElementBinding;
|
||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLUListElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{AbstractNode, Node, ScriptView};
|
||||
|
||||
pub struct HTMLUListElement {
|
||||
htmlelement: HTMLElement
|
||||
}
|
||||
|
||||
impl HTMLUListElement {
|
||||
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLUListElement {
|
||||
HTMLUListElement {
|
||||
htmlelement: HTMLElement::new(HTMLUListElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||
let element = HTMLUListElement::new_inherited(localName, document);
|
||||
Node::reflect_node(@mut element, document, HTMLUListElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLUListElement {
|
||||
pub fn Compact(&self) -> bool {
|
||||
false
|
||||
|
|
|
@ -268,7 +268,6 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
|
|||
handle_element!(cx, document, tag, "title", HTMLTitleElementTypeId, HTMLTitleElement, []);
|
||||
handle_element!(cx, document, tag, "tr", HTMLTableRowElementTypeId, HTMLTableRowElement, []);
|
||||
handle_element!(cx, document, tag, "track", HTMLTrackElementTypeId, HTMLTrackElement, []);
|
||||
handle_element!(cx, document, tag, "ul", HTMLUListElementTypeId, HTMLUListElement, []);
|
||||
|
||||
handle_htmlelement!(cx, document, tag, "aside", HTMLElementTypeId, HTMLElement);
|
||||
handle_htmlelement!(cx, document, tag, "b", HTMLElementTypeId, HTMLElement);
|
||||
|
@ -287,6 +286,7 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
|
|||
handle_newable_element!(document, tag, "img", HTMLImageElement);
|
||||
handle_newable_element!(document, tag, "td", HTMLTableDataCellElement);
|
||||
handle_newable_element!(document, tag, "th", HTMLTableHeaderCellElement);
|
||||
handle_newable_element!(document, tag, "ul", HTMLUListElement);
|
||||
handle_newable_element!(document, tag, "video", HTMLVideoElement);
|
||||
|
||||
return HTMLUnknownElement::new(tag.to_str(), document);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue