mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Generate bindings for HTMLMeterElement.
This commit is contained in:
parent
6c90dd54b2
commit
0fae7afa54
8 changed files with 96 additions and 2 deletions
|
@ -585,6 +585,7 @@ addHTMLElement('HTMLLIElement')
|
|||
addHTMLElement('HTMLLinkElement')
|
||||
addHTMLElement('HTMLMapElement')
|
||||
addHTMLElement('HTMLMetaElement')
|
||||
addHTMLElement('HTMLMeterElement')
|
||||
addHTMLElement('HTMLOListElement')
|
||||
addHTMLElement('HTMLParagraphElement')
|
||||
addHTMLElement('HTMLProgressElement')
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* -*- 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-meter-element
|
||||
*
|
||||
* © 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-meter-element
|
||||
interface HTMLMeterElement : HTMLElement {
|
||||
[SetterThrows]
|
||||
attribute double value;
|
||||
[SetterThrows]
|
||||
attribute double min;
|
||||
[SetterThrows]
|
||||
attribute double max;
|
||||
[SetterThrows]
|
||||
attribute double low;
|
||||
[SetterThrows]
|
||||
attribute double high;
|
||||
[SetterThrows]
|
||||
attribute double optimum;
|
||||
|
||||
/**
|
||||
* The labels attribute will be done with bug 556743.
|
||||
*/
|
||||
//readonly attribute NodeList labels;
|
||||
};
|
|
@ -393,6 +393,8 @@ generate_cacheable_wrapper!(HTMLMapElement, HTMLMapElementBinding::Wrap)
|
|||
generate_binding_object!(HTMLMapElement)
|
||||
generate_cacheable_wrapper!(HTMLMetaElement, HTMLMetaElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLMetaElement)
|
||||
generate_cacheable_wrapper!(HTMLMeterElement, HTMLMeterElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLMeterElement)
|
||||
generate_cacheable_wrapper!(HTMLOListElement, HTMLOListElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLOListElement)
|
||||
generate_cacheable_wrapper!(HTMLParagraphElement, HTMLParagraphElementBinding::Wrap)
|
||||
|
|
|
@ -17,7 +17,7 @@ use dom::element::{HTMLElementTypeId,
|
|||
HTMLHRElementTypeId, HTMLHtmlElementTypeId, HTMLIframeElementTypeId,
|
||||
HTMLImageElementTypeId, HTMLInputElementTypeId, HTMLLIElementTypeId,
|
||||
HTMLLinkElementTypeId, HTMLMapElementTypeId, HTMLMetaElementTypeId,
|
||||
HTMLOListElementTypeId, HTMLParagraphElementTypeId,
|
||||
HTMLMeterElementTypeId, HTMLOListElementTypeId, HTMLParagraphElementTypeId,
|
||||
HTMLProgressElementTypeId, HTMLQuoteElementTypeId, HTMLScriptElementTypeId,
|
||||
HTMLSpanElementTypeId, HTMLSourceElementTypeId,
|
||||
HTMLStyleElementTypeId, HTMLTextAreaElementTypeId,
|
||||
|
@ -120,6 +120,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
|||
ElementNodeTypeId(HTMLLinkElementTypeId) => generate_element!(HTMLLinkElement),
|
||||
ElementNodeTypeId(HTMLMapElementTypeId) => generate_element!(HTMLMapElement),
|
||||
ElementNodeTypeId(HTMLMetaElementTypeId) => generate_element!(HTMLMetaElement),
|
||||
ElementNodeTypeId(HTMLMeterElementTypeId) => generate_element!(HTMLMeterElement),
|
||||
ElementNodeTypeId(HTMLOListElementTypeId) => generate_element!(HTMLOListElement),
|
||||
ElementNodeTypeId(HTMLParagraphElementTypeId) => generate_element!(HTMLParagraphElement),
|
||||
ElementNodeTypeId(HTMLProgressElementTypeId) => generate_element!(HTMLProgressElement),
|
||||
|
|
|
@ -78,6 +78,7 @@ pub enum ElementTypeId {
|
|||
HTMLLIElementTypeId,
|
||||
HTMLMapElementTypeId,
|
||||
HTMLMetaElementTypeId,
|
||||
HTMLMeterElementTypeId,
|
||||
HTMLOListElementTypeId,
|
||||
HTMLOptionElementTypeId,
|
||||
HTMLParagraphElementTypeId,
|
||||
|
|
54
src/components/script/dom/htmlmeterelement.rs
Normal file
54
src/components/script/dom/htmlmeterelement.rs
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* 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::ErrorResult;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
||||
pub struct HTMLMeterElement {
|
||||
parent: HTMLElement
|
||||
}
|
||||
|
||||
impl HTMLMeterElement {
|
||||
pub fn Value(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Min(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetMin(&mut self, _min: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Max(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetMax(&mut self, _max: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Low(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetLow(&mut self, _low: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn High(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetHigh(&mut self, _high: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Optimum(&self) -> f64 {
|
||||
0.0
|
||||
}
|
||||
|
||||
pub fn SetOptimum(&mut self, _optimum: f64, _rv: &mut ErrorResult) {
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ use dom::element::{HTMLElementTypeId,
|
|||
HTMLHeadElementTypeId, HTMLHtmlElementTypeId, HTMLImageElementTypeId,
|
||||
HTMLIframeElementTypeId, HTMLInputElementTypeId, HTMLLinkElementTypeId,
|
||||
HTMLLIElementTypeId, HTMLMapElementTypeId, HTMLMetaElementTypeId,
|
||||
HTMLOListElementTypeId, HTMLOptionElementTypeId,
|
||||
HTMLMeterElementTypeId, HTMLOListElementTypeId, HTMLOptionElementTypeId,
|
||||
HTMLParagraphElementTypeId, HTMLProgressElementTypeId,
|
||||
HTMLQuoteElementTypeId, HTMLScriptElementTypeId,
|
||||
HTMLSelectElementTypeId, HTMLSmallElementTypeId, HTMLSourceElementTypeId,
|
||||
|
@ -235,6 +235,7 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
|||
handle_element!(cx, tag, "li", HTMLLIElementTypeId, HTMLLIElement, []);
|
||||
handle_element!(cx, tag, "map", HTMLMapElementTypeId, HTMLMapElement, []);
|
||||
handle_element!(cx, tag, "meta", HTMLMetaElementTypeId, HTMLMetaElement, []);
|
||||
handle_element!(cx, tag, "meter", HTMLMeterElementTypeId, HTMLMeterElement, []);
|
||||
handle_element!(cx, tag, "ol", HTMLOListElementTypeId, HTMLOListElement, []);
|
||||
handle_element!(cx, tag, "option", HTMLOptionElementTypeId, HTMLOptionElement, []);
|
||||
handle_element!(cx, tag, "p", HTMLParagraphElementTypeId, HTMLParagraphElement, []);
|
||||
|
|
|
@ -87,6 +87,7 @@ pub mod dom {
|
|||
pub mod htmllinkelement;
|
||||
pub mod htmlmapelement;
|
||||
pub mod htmlmetaelement;
|
||||
pub mod htmlmeterelement;
|
||||
pub mod htmlolistelement;
|
||||
pub mod htmlparagraphelement;
|
||||
pub mod htmlprogresselement;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue