mirror of
https://github.com/servo/servo.git
synced 2025-10-17 16:59:27 +01:00
Move WebIDL methods to traits implemented by JSRef types.
This commit is contained in:
parent
dfdda0098a
commit
76783b029e
106 changed files with 3644 additions and 1912 deletions
|
@ -40,44 +40,58 @@ impl HTMLHRElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl HTMLHRElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub trait HTMLHRElementMethods {
|
||||
fn Align(&self) -> DOMString;
|
||||
fn SetAlign(&mut self, _align: DOMString) -> ErrorResult;
|
||||
fn Color(&self) -> DOMString;
|
||||
fn SetColor(&mut self, _color: DOMString) -> ErrorResult;
|
||||
fn NoShade(&self) -> bool;
|
||||
fn SetNoShade(&self, _no_shade: bool) -> ErrorResult;
|
||||
fn Size(&self) -> DOMString;
|
||||
fn SetSize(&mut self, _size: DOMString) -> ErrorResult;
|
||||
fn Width(&self) -> DOMString;
|
||||
fn SetWidth(&mut self, _width: DOMString) -> ErrorResult;
|
||||
}
|
||||
|
||||
impl<'a> HTMLHRElementMethods for JSRef<'a, HTMLHRElement> {
|
||||
fn Align(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: DOMString) -> ErrorResult {
|
||||
fn SetAlign(&mut self, _align: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Color(&self) -> DOMString {
|
||||
fn Color(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetColor(&mut self, _color: DOMString) -> ErrorResult {
|
||||
fn SetColor(&mut self, _color: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn NoShade(&self) -> bool {
|
||||
fn NoShade(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetNoShade(&self, _no_shade: bool) -> ErrorResult {
|
||||
fn SetNoShade(&self, _no_shade: bool) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> DOMString {
|
||||
fn Size(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: DOMString) -> ErrorResult {
|
||||
fn SetSize(&mut self, _size: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
fn Width(&self) -> DOMString {
|
||||
~""
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: DOMString) -> ErrorResult {
|
||||
fn SetWidth(&mut self, _width: DOMString) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue