mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
auto merge of #1162 : Ms2ger/servo/new-htmlelement, r=jdm
This commit is contained in:
commit
041f3a8b06
31 changed files with 517 additions and 62 deletions
|
@ -2,11 +2,25 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLAudioElementBinding;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLAudioElementTypeId;
|
||||||
use dom::htmlmediaelement::HTMLMediaElement;
|
use dom::htmlmediaelement::HTMLMediaElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLAudioElement {
|
pub struct HTMLAudioElement {
|
||||||
htmlmediaelement: HTMLMediaElement
|
htmlmediaelement: HTMLMediaElement
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLAudioElement {
|
impl HTMLAudioElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLAudioElement {
|
||||||
|
HTMLAudioElement {
|
||||||
|
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLAudioElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLAudioElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLAudioElementBinding::Wrap)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLHeadingElementBinding;
|
||||||
use dom::bindings::utils::DOMString;
|
use dom::bindings::utils::DOMString;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLHeadingElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub enum HeadingLevel {
|
pub enum HeadingLevel {
|
||||||
Heading1,
|
Heading1,
|
||||||
|
@ -19,6 +23,20 @@ pub struct HTMLHeadingElement {
|
||||||
level: HeadingLevel,
|
level: HeadingLevel,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLHeadingElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> HTMLHeadingElement {
|
||||||
|
HTMLHeadingElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLHeadingElementTypeId, localName, document),
|
||||||
|
level: level,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument, level: HeadingLevel) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLHeadingElement::new_inherited(localName, document, level);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLHeadingElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLHeadingElement {
|
impl HTMLHeadingElement {
|
||||||
pub fn Align(&self) -> DOMString {
|
pub fn Align(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLIFrameElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||||
use dom::document::AbstractDocument;
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLIframeElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{AbstractNode, ScriptView};
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
use dom::windowproxy::WindowProxy;
|
use dom::windowproxy::WindowProxy;
|
||||||
use geom::size::Size2D;
|
use geom::size::Size2D;
|
||||||
use geom::rect::Rect;
|
use geom::rect::Rect;
|
||||||
|
@ -58,6 +60,22 @@ impl HTMLIFrameElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLIFrameElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLIFrameElement {
|
||||||
|
HTMLIFrameElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLIframeElementTypeId, localName, document),
|
||||||
|
frame: None,
|
||||||
|
size: None,
|
||||||
|
sandbox: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLIFrameElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLIFrameElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLIFrameElement {
|
impl HTMLIFrameElement {
|
||||||
pub fn Src(&self) -> DOMString {
|
pub fn Src(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,9 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLImageElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLImageElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{ScriptView, AbstractNode};
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
use extra::url::Url;
|
use extra::url::Url;
|
||||||
use servo_util::geometry::to_px;
|
use servo_util::geometry::to_px;
|
||||||
use layout_interface::{ContentBoxQuery, ContentBoxResponse};
|
use layout_interface::{ContentBoxQuery, ContentBoxResponse};
|
||||||
|
@ -18,6 +21,20 @@ pub struct HTMLImageElement {
|
||||||
image: Option<Url>,
|
image: Option<Url>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLImageElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLImageElement {
|
||||||
|
HTMLImageElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLImageElementTypeId, localName, document),
|
||||||
|
image: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLImageElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLImageElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLImageElement {
|
impl HTMLImageElement {
|
||||||
/// Makes the local `image` member match the status of the `src` attribute and starts
|
/// Makes the local `image` member match the status of the `src` attribute and starts
|
||||||
/// prefetching the image. This method must be called after `src` is changed.
|
/// prefetching the image. This method must be called after `src` is changed.
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub struct HTMLMediaElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLMediaElement {
|
impl HTMLMediaElement {
|
||||||
pub fn new(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLMediaElement {
|
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLMediaElement {
|
||||||
HTMLMediaElement {
|
HTMLMediaElement {
|
||||||
htmlelement: HTMLElement::new(type_id, tag_name, document)
|
htmlelement: HTMLElement::new(type_id, tag_name, document)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLParagraphElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLParagraphElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLParagraphElement {
|
pub struct HTMLParagraphElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLParagraphElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParagraphElement {
|
||||||
|
HTMLParagraphElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLParagraphElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLParagraphElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLParagraphElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLParagraphElement {
|
impl HTMLParagraphElement {
|
||||||
pub fn Align(&self) -> DOMString {
|
pub fn Align(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLParamElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLParamElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLParamElement {
|
pub struct HTMLParamElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLParamElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLParamElement {
|
||||||
|
HTMLParamElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLParamElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLParamElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLParamElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLParamElement {
|
impl HTMLParamElement {
|
||||||
pub fn Name(&self) -> DOMString {
|
pub fn Name(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLPreElementBinding;
|
||||||
use dom::bindings::utils::{ErrorResult};
|
use dom::bindings::utils::{ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLPreElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLPreElement {
|
pub struct HTMLPreElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLPreElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLPreElement {
|
||||||
|
HTMLPreElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLPreElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLPreElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLPreElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLPreElement {
|
impl HTMLPreElement {
|
||||||
pub fn Width(&self) -> i32 {
|
pub fn Width(&self) -> i32 {
|
||||||
0
|
0
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLProgressElementBinding;
|
||||||
use dom::bindings::utils::{ErrorResult, Fallible};
|
use dom::bindings::utils::{ErrorResult, Fallible};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLProgressElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLProgressElement {
|
pub struct HTMLProgressElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLProgressElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLProgressElement {
|
||||||
|
HTMLProgressElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLProgressElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLProgressElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLProgressElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLProgressElement {
|
impl HTMLProgressElement {
|
||||||
pub fn Value(&self) -> f64 {
|
pub fn Value(&self) -> f64 {
|
||||||
0f64
|
0f64
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLQuoteElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLQuoteElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLQuoteElement {
|
pub struct HTMLQuoteElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLQuoteElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLQuoteElement {
|
||||||
|
HTMLQuoteElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLQuoteElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLQuoteElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLQuoteElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLQuoteElement {
|
impl HTMLQuoteElement {
|
||||||
pub fn Cite(&self) -> DOMString {
|
pub fn Cite(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,14 +2,31 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLScriptElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLScriptElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
use servo_util::tree::ElementLike;
|
use servo_util::tree::ElementLike;
|
||||||
|
|
||||||
pub struct HTMLScriptElement {
|
pub struct HTMLScriptElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLScriptElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLScriptElement {
|
||||||
|
HTMLScriptElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLScriptElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLScriptElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLScriptElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLScriptElement {
|
impl HTMLScriptElement {
|
||||||
pub fn Src(&self) -> DOMString {
|
pub fn Src(&self) -> DOMString {
|
||||||
self.htmlelement.element.get_attr("src").map(|s| s.to_str())
|
self.htmlelement.element.get_attr("src").map(|s| s.to_str())
|
||||||
|
|
|
@ -2,15 +2,31 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLSelectElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLSelectElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{AbstractNode, ScriptView};
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
|
|
||||||
pub struct HTMLSelectElement {
|
pub struct HTMLSelectElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLSelectElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSelectElement {
|
||||||
|
HTMLSelectElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLSelectElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLSelectElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLSelectElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLSelectElement {
|
impl HTMLSelectElement {
|
||||||
pub fn Autofocus(&self) -> bool {
|
pub fn Autofocus(&self) -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLSourceElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLSourceElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLSourceElement {
|
pub struct HTMLSourceElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLSourceElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSourceElement {
|
||||||
|
HTMLSourceElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLSourceElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLSourceElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLSourceElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLSourceElement {
|
impl HTMLSourceElement {
|
||||||
pub fn Src(&self) -> DOMString {
|
pub fn Src(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,8 +2,25 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLSpanElementBinding;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLSpanElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLSpanElement {
|
pub struct HTMLSpanElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLSpanElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLSpanElement {
|
||||||
|
HTMLSpanElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLSpanElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLSpanElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLSpanElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLStyleElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLStyleElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLStyleElement {
|
pub struct HTMLStyleElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLStyleElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLStyleElement {
|
||||||
|
HTMLStyleElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLStyleElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLStyleElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLStyleElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLStyleElement {
|
impl HTMLStyleElement {
|
||||||
pub fn Disabled(&self) -> bool {
|
pub fn Disabled(&self) -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableCaptionElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableCaptionElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableCaptionElement {
|
pub struct HTMLTableCaptionElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableCaptionElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableCaptionElement {
|
||||||
|
HTMLTableCaptionElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTableCaptionElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableCaptionElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableCaptionElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTableCaptionElement {
|
impl HTMLTableCaptionElement {
|
||||||
pub fn Align(&self) -> DOMString {
|
pub fn Align(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub struct HTMLTableCellElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableCellElement {
|
impl HTMLTableCellElement {
|
||||||
pub fn new(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLTableCellElement {
|
pub fn new_inherited(type_id: ElementTypeId, tag_name: ~str, document: AbstractDocument) -> HTMLTableCellElement {
|
||||||
HTMLTableCellElement {
|
HTMLTableCellElement {
|
||||||
htmlelement: HTMLElement::new(type_id, tag_name, document)
|
htmlelement: HTMLElement::new(type_id, tag_name, document)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableColElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableColElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableColElement {
|
pub struct HTMLTableColElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableColElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableColElement {
|
||||||
|
HTMLTableColElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTableColElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableColElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableColElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTableColElement {
|
impl HTMLTableColElement {
|
||||||
pub fn Span(&self) -> u32 {
|
pub fn Span(&self) -> u32 {
|
||||||
0
|
0
|
||||||
|
|
|
@ -2,8 +2,25 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableDataCellElementBinding;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableDataCellElementTypeId;
|
||||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableDataCellElement {
|
pub struct HTMLTableDataCellElement {
|
||||||
htmltablecellelement: HTMLTableCellElement,
|
htmltablecellelement: HTMLTableCellElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableDataCellElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableDataCellElement {
|
||||||
|
HTMLTableDataCellElement {
|
||||||
|
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableDataCellElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableDataCellElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableDataCellElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,15 +2,31 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableElement {
|
pub struct HTMLTableElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTableElement {
|
impl HTMLTableElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableElement {
|
||||||
|
HTMLTableElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTableElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HTMLTableElement {
|
||||||
pub fn DeleteCaption(&self) {
|
pub fn DeleteCaption(&self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,25 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableHeaderCellElementBinding;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableHeaderCellElementTypeId;
|
||||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableHeaderCellElement {
|
pub struct HTMLTableHeaderCellElement {
|
||||||
htmltablecellelement: HTMLTableCellElement,
|
htmltablecellelement: HTMLTableCellElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableHeaderCellElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableHeaderCellElement {
|
||||||
|
HTMLTableHeaderCellElement {
|
||||||
|
htmltablecellelement: HTMLTableCellElement::new_inherited(HTMLTableHeaderCellElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableHeaderCellElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableHeaderCellElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableRowElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableRowElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableRowElement {
|
pub struct HTMLTableRowElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableRowElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableRowElement {
|
||||||
|
HTMLTableRowElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTableRowElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableRowElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableRowElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTableRowElement {
|
impl HTMLTableRowElement {
|
||||||
pub fn RowIndex(&self) -> i32 {
|
pub fn RowIndex(&self) -> i32 {
|
||||||
0
|
0
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTableSectionElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTableSectionElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTableSectionElement {
|
pub struct HTMLTableSectionElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTableSectionElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTableSectionElement {
|
||||||
|
HTMLTableSectionElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTableSectionElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTableSectionElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTableSectionElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTableSectionElement {
|
impl HTMLTableSectionElement {
|
||||||
pub fn DeleteRow(&mut self, _index: i32) -> ErrorResult {
|
pub fn DeleteRow(&mut self, _index: i32) -> ErrorResult {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -2,11 +2,25 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTemplateElementBinding;
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTemplateElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTemplateElement {
|
pub struct HTMLTemplateElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLTemplateElement {
|
impl HTMLTemplateElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTemplateElement {
|
||||||
|
HTMLTemplateElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTemplateElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTemplateElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTemplateElementBinding::Wrap)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTextAreaElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
|
use dom::bindings::utils::{DOMString, ErrorResult, Fallible};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTextAreaElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTextAreaElement {
|
pub struct HTMLTextAreaElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTextAreaElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTextAreaElement {
|
||||||
|
HTMLTextAreaElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTextAreaElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTextAreaElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTextAreaElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTextAreaElement {
|
impl HTMLTextAreaElement {
|
||||||
pub fn Autofocus(&self) -> bool {
|
pub fn Autofocus(&self) -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTimeElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTimeElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTimeElement {
|
pub struct HTMLTimeElement {
|
||||||
htmlelement: HTMLElement
|
htmlelement: HTMLElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTimeElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTimeElement {
|
||||||
|
HTMLTimeElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTimeElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTimeElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTimeElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTimeElement {
|
impl HTMLTimeElement {
|
||||||
pub fn DateTime(&self) -> DOMString {
|
pub fn DateTime(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTitleElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTitleElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTitleElement {
|
pub struct HTMLTitleElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTitleElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTitleElement {
|
||||||
|
HTMLTitleElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTitleElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTitleElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTitleElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTitleElement {
|
impl HTMLTitleElement {
|
||||||
pub fn Text(&self) -> DOMString {
|
pub fn Text(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLTrackElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLTrackElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLTrackElement {
|
pub struct HTMLTrackElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLTrackElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLTrackElement {
|
||||||
|
HTMLTrackElement {
|
||||||
|
htmlelement: HTMLElement::new(HTMLTrackElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLTrackElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLTrackElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLTrackElement {
|
impl HTMLTrackElement {
|
||||||
pub fn Kind(&self) -> DOMString {
|
pub fn Kind(&self) -> DOMString {
|
||||||
None
|
None
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLUListElementTypeId;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLUListElement {
|
pub struct HTMLUListElement {
|
||||||
htmlelement: HTMLElement
|
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 {
|
impl HTMLUListElement {
|
||||||
pub fn Compact(&self) -> bool {
|
pub fn Compact(&self) -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -2,13 +2,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::bindings::codegen::HTMLVideoElementBinding;
|
||||||
use dom::bindings::utils::{DOMString, ErrorResult};
|
use dom::bindings::utils::{DOMString, ErrorResult};
|
||||||
|
use dom::document::AbstractDocument;
|
||||||
|
use dom::element::HTMLVideoElementTypeId;
|
||||||
use dom::htmlmediaelement::HTMLMediaElement;
|
use dom::htmlmediaelement::HTMLMediaElement;
|
||||||
|
use dom::node::{AbstractNode, Node, ScriptView};
|
||||||
|
|
||||||
pub struct HTMLVideoElement {
|
pub struct HTMLVideoElement {
|
||||||
htmlmediaelement: HTMLMediaElement
|
htmlmediaelement: HTMLMediaElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HTMLVideoElement {
|
||||||
|
pub fn new_inherited(localName: ~str, document: AbstractDocument) -> HTMLVideoElement {
|
||||||
|
HTMLVideoElement {
|
||||||
|
htmlmediaelement: HTMLMediaElement::new_inherited(HTMLVideoElementTypeId, localName, document)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(localName: ~str, document: AbstractDocument) -> AbstractNode<ScriptView> {
|
||||||
|
let element = HTMLVideoElement::new_inherited(localName, document);
|
||||||
|
Node::reflect_node(@mut element, document, HTMLVideoElementBinding::Wrap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HTMLVideoElement {
|
impl HTMLVideoElement {
|
||||||
pub fn Width(&self) -> u32 {
|
pub fn Width(&self) -> u32 {
|
||||||
0
|
0
|
||||||
|
|
|
@ -56,26 +56,15 @@ macro_rules! handle_htmlelement(
|
||||||
$cx, $document, $tag, $string, $type_id, $ctor, []);
|
$cx, $document, $tag, $string, $type_id, $ctor, []);
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
macro_rules! handle_htmlmediaelement(
|
macro_rules! handle_newable_element(
|
||||||
($cx: expr,
|
($document: expr,
|
||||||
$document: expr,
|
$localName: expr,
|
||||||
$tag: expr,
|
|
||||||
$string: expr,
|
$string: expr,
|
||||||
$type_id: expr,
|
$ctor: ident
|
||||||
$ctor: ident) => (
|
$(, $arg:expr )*) => (
|
||||||
handle_element_base!(htmlmediaelement, HTMLMediaElement,
|
if eq_slice($localName, $string) {
|
||||||
$cx, $document, $tag, $string, $type_id, $ctor, []);
|
return $ctor::new(($localName).to_str(), $document $(, $arg)*);
|
||||||
)
|
}
|
||||||
)
|
|
||||||
macro_rules! handle_htmltablecellelement(
|
|
||||||
($cx: expr,
|
|
||||||
$document: expr,
|
|
||||||
$tag: expr,
|
|
||||||
$string: expr,
|
|
||||||
$type_id: expr,
|
|
||||||
$ctor: ident) => (
|
|
||||||
handle_element_base!(htmltablecellelement, HTMLTableCellElement,
|
|
||||||
$cx, $document, $tag, $string, $type_id, $ctor, []);
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
macro_rules! handle_element_base(
|
macro_rules! handle_element_base(
|
||||||
|
@ -258,39 +247,6 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
|
||||||
handle_element!(cx, document, tag, "option", HTMLOptionElementTypeId, HTMLOptionElement, []);
|
handle_element!(cx, document, tag, "option", HTMLOptionElementTypeId, HTMLOptionElement, []);
|
||||||
handle_element!(cx, document, tag, "optgroup",HTMLOptGroupElementTypeId, HTMLOptGroupElement, []);
|
handle_element!(cx, document, tag, "optgroup",HTMLOptGroupElementTypeId, HTMLOptGroupElement, []);
|
||||||
handle_element!(cx, document, tag, "output", HTMLOutputElementTypeId, HTMLOutputElement, []);
|
handle_element!(cx, document, tag, "output", HTMLOutputElementTypeId, HTMLOutputElement, []);
|
||||||
handle_element!(cx, document, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
|
|
||||||
handle_element!(cx, document, tag, "param", HTMLParamElementTypeId, HTMLParamElement, []);
|
|
||||||
handle_element!(cx, document, tag, "pre", HTMLPreElementTypeId, HTMLPreElement, []);
|
|
||||||
handle_element!(cx, document, tag, "progress",HTMLProgressElementTypeId, HTMLProgressElement, []);
|
|
||||||
handle_element!(cx, document, tag, "q", HTMLQuoteElementTypeId, HTMLQuoteElement, []);
|
|
||||||
handle_element!(cx, document, tag, "script", HTMLScriptElementTypeId, HTMLScriptElement, []);
|
|
||||||
handle_element!(cx, document, tag, "select", HTMLSelectElementTypeId, HTMLSelectElement, []);
|
|
||||||
handle_element!(cx, document, tag, "source", HTMLSourceElementTypeId, HTMLSourceElement, []);
|
|
||||||
handle_element!(cx, document, tag, "span", HTMLSpanElementTypeId, HTMLSpanElement, []);
|
|
||||||
handle_element!(cx, document, tag, "style", HTMLStyleElementTypeId, HTMLStyleElement, []);
|
|
||||||
handle_element!(cx, document, tag, "table", HTMLTableElementTypeId, HTMLTableElement, []);
|
|
||||||
handle_element!(cx, document, tag, "caption", HTMLTableCaptionElementTypeId, HTMLTableCaptionElement, []);
|
|
||||||
handle_element!(cx, document, tag, "col", HTMLTableColElementTypeId, HTMLTableColElement, []);
|
|
||||||
handle_element!(cx, document, tag, "colgroup",HTMLTableColElementTypeId, HTMLTableColElement, []);
|
|
||||||
handle_element!(cx, document, tag, "tbody", HTMLTableSectionElementTypeId, HTMLTableSectionElement, []);
|
|
||||||
handle_element!(cx, document, tag, "template",HTMLTemplateElementTypeId, HTMLTemplateElement, []);
|
|
||||||
handle_element!(cx, document, tag, "textarea",HTMLTextAreaElementTypeId, HTMLTextAreaElement, []);
|
|
||||||
handle_element!(cx, document, tag, "time", HTMLTimeElementTypeId, HTMLTimeElement, []);
|
|
||||||
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_element!(cx, document, tag, "img", HTMLImageElementTypeId, HTMLImageElement, [(image: None)]);
|
|
||||||
handle_element!(cx, document, tag, "iframe", HTMLIframeElementTypeId, HTMLIFrameElement, [(frame: None), (size: None), (sandbox: None)]);
|
|
||||||
|
|
||||||
handle_element!(cx, document, tag, "h1", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading1)]);
|
|
||||||
handle_element!(cx, document, tag, "h2", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading2)]);
|
|
||||||
handle_element!(cx, document, tag, "h3", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading3)]);
|
|
||||||
handle_element!(cx, document, tag, "h4", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading4)]);
|
|
||||||
handle_element!(cx, document, tag, "h5", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading5)]);
|
|
||||||
handle_element!(cx, document, tag, "h6", HTMLHeadingElementTypeId, HTMLHeadingElement, [(level: Heading6)]);
|
|
||||||
|
|
||||||
|
|
||||||
handle_htmlelement!(cx, document, tag, "aside", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, document, tag, "aside", HTMLElementTypeId, HTMLElement);
|
||||||
handle_htmlelement!(cx, document, tag, "b", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, document, tag, "b", HTMLElementTypeId, HTMLElement);
|
||||||
|
@ -298,11 +254,40 @@ pub fn build_element_from_tag(cx: *JSContext, tag: &str, document: AbstractDocum
|
||||||
handle_htmlelement!(cx, document, tag, "section", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, document, tag, "section", HTMLElementTypeId, HTMLElement);
|
||||||
handle_htmlelement!(cx, document, tag, "small", HTMLElementTypeId, HTMLElement);
|
handle_htmlelement!(cx, document, tag, "small", HTMLElementTypeId, HTMLElement);
|
||||||
|
|
||||||
handle_htmlmediaelement!(cx, document, tag, "audio", HTMLAudioElementTypeId, HTMLAudioElement);
|
handle_newable_element!(document, tag, "audio", HTMLAudioElement);
|
||||||
handle_htmlmediaelement!(cx, document, tag, "video", HTMLVideoElementTypeId, HTMLVideoElement);
|
handle_newable_element!(document, tag, "caption", HTMLTableCaptionElement);
|
||||||
|
handle_newable_element!(document, tag, "col", HTMLTableColElement);
|
||||||
handle_htmltablecellelement!(cx, document, tag, "td", HTMLTableDataCellElementTypeId, HTMLTableDataCellElement);
|
handle_newable_element!(document, tag, "colgroup", HTMLTableColElement);
|
||||||
handle_htmltablecellelement!(cx, document, tag, "th", HTMLTableHeaderCellElementTypeId, HTMLTableHeaderCellElement);
|
handle_newable_element!(document, tag, "h1", HTMLHeadingElement, Heading1);
|
||||||
|
handle_newable_element!(document, tag, "h2", HTMLHeadingElement, Heading2);
|
||||||
|
handle_newable_element!(document, tag, "h3", HTMLHeadingElement, Heading3);
|
||||||
|
handle_newable_element!(document, tag, "h4", HTMLHeadingElement, Heading4);
|
||||||
|
handle_newable_element!(document, tag, "h5", HTMLHeadingElement, Heading5);
|
||||||
|
handle_newable_element!(document, tag, "h6", HTMLHeadingElement, Heading6);
|
||||||
|
handle_newable_element!(document, tag, "iframe", HTMLIFrameElement);
|
||||||
|
handle_newable_element!(document, tag, "img", HTMLImageElement);
|
||||||
|
handle_newable_element!(document, tag, "p", HTMLParagraphElement);
|
||||||
|
handle_newable_element!(document, tag, "param", HTMLParamElement);
|
||||||
|
handle_newable_element!(document, tag, "pre", HTMLPreElement);
|
||||||
|
handle_newable_element!(document, tag, "progress", HTMLProgressElement);
|
||||||
|
handle_newable_element!(document, tag, "q", HTMLQuoteElement);
|
||||||
|
handle_newable_element!(document, tag, "script", HTMLScriptElement);
|
||||||
|
handle_newable_element!(document, tag, "select", HTMLSelectElement);
|
||||||
|
handle_newable_element!(document, tag, "source", HTMLSourceElement);
|
||||||
|
handle_newable_element!(document, tag, "span", HTMLSpanElement);
|
||||||
|
handle_newable_element!(document, tag, "style", HTMLStyleElement);
|
||||||
|
handle_newable_element!(document, tag, "table", HTMLTableElement);
|
||||||
|
handle_newable_element!(document, tag, "tbody", HTMLTableSectionElement);
|
||||||
|
handle_newable_element!(document, tag, "td", HTMLTableDataCellElement);
|
||||||
|
handle_newable_element!(document, tag, "template", HTMLTemplateElement);
|
||||||
|
handle_newable_element!(document, tag, "textarea", HTMLTextAreaElement);
|
||||||
|
handle_newable_element!(document, tag, "th", HTMLTableHeaderCellElement);
|
||||||
|
handle_newable_element!(document, tag, "time", HTMLTimeElement);
|
||||||
|
handle_newable_element!(document, tag, "title", HTMLTitleElement);
|
||||||
|
handle_newable_element!(document, tag, "tr", HTMLTableRowElement);
|
||||||
|
handle_newable_element!(document, tag, "track", HTMLTrackElement);
|
||||||
|
handle_newable_element!(document, tag, "ul", HTMLUListElement);
|
||||||
|
handle_newable_element!(document, tag, "video", HTMLVideoElement);
|
||||||
|
|
||||||
return HTMLUnknownElement::new(tag.to_str(), document);
|
return HTMLUnknownElement::new(tag.to_str(), document);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue