mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Use macro getters for input elements
This commit is contained in:
parent
2ce5b46bba
commit
8f47259d6e
7 changed files with 7 additions and 28 deletions
|
@ -50,10 +50,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -69,10 +69,7 @@ impl<'a> HTMLFieldSetElementMethods for JSRef<'a, HTMLFieldSetElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fieldset-disabled
|
// http://www.whatwg.org/html/#dom-fieldset-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fieldset-disabled
|
// http://www.whatwg.org/html/#dom-fieldset-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -44,10 +44,7 @@ impl HTMLInputElement {
|
||||||
|
|
||||||
impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> {
|
impl<'a> HTMLInputElementMethods for JSRef<'a, HTMLInputElement> {
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -44,10 +44,7 @@ impl HTMLOptGroupElement {
|
||||||
|
|
||||||
impl<'a> HTMLOptGroupElementMethods for JSRef<'a, HTMLOptGroupElement> {
|
impl<'a> HTMLOptGroupElementMethods for JSRef<'a, HTMLOptGroupElement> {
|
||||||
// http://www.whatwg.org/html#dom-optgroup-disabled
|
// http://www.whatwg.org/html#dom-optgroup-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html#dom-optgroup-disabled
|
// http://www.whatwg.org/html#dom-optgroup-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -44,10 +44,7 @@ impl HTMLOptionElement {
|
||||||
|
|
||||||
impl<'a> HTMLOptionElementMethods for JSRef<'a, HTMLOptionElement> {
|
impl<'a> HTMLOptionElementMethods for JSRef<'a, HTMLOptionElement> {
|
||||||
// http://www.whatwg.org/html/#dom-option-disabled
|
// http://www.whatwg.org/html/#dom-option-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-option-disabled
|
// http://www.whatwg.org/html/#dom-option-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -56,10 +56,7 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
|
@ -44,10 +44,7 @@ impl HTMLTextAreaElement {
|
||||||
|
|
||||||
impl<'a> HTMLTextAreaElementMethods for JSRef<'a, HTMLTextAreaElement> {
|
impl<'a> HTMLTextAreaElementMethods for JSRef<'a, HTMLTextAreaElement> {
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn Disabled(&self) -> bool {
|
make_bool_getter!(Disabled)
|
||||||
let elem: &JSRef<Element> = ElementCast::from_ref(self);
|
|
||||||
elem.has_attribute("disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#dom-fe-disabled
|
// http://www.whatwg.org/html/#dom-fe-disabled
|
||||||
fn SetDisabled(&self, disabled: bool) {
|
fn SetDisabled(&self, disabled: bool) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue