mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Introduce a set_uint_attribute method.
This commit is contained in:
parent
4386bae576
commit
bb732ef4e6
3 changed files with 10 additions and 6 deletions
|
@ -144,9 +144,9 @@ impl HTMLImageElement {
|
|||
to_px(rect.size.width) as u32
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, abstract_self: &JS<HTMLImageElement>, width: u32) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, abstract_self: &JS<HTMLImageElement>, width: u32) {
|
||||
let mut elem: JS<Element> = ElementCast::from(abstract_self);
|
||||
elem.set_attr(~"width", width.to_str())
|
||||
elem.set_uint_attribute("width", width)
|
||||
}
|
||||
|
||||
pub fn Height(&self, abstract_self: &JS<HTMLImageElement>) -> u32 {
|
||||
|
@ -160,9 +160,9 @@ impl HTMLImageElement {
|
|||
to_px(rect.size.height) as u32
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, abstract_self: &JS<HTMLImageElement>, height: u32) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, abstract_self: &JS<HTMLImageElement>, height: u32) {
|
||||
let mut elem: JS<Element> = ElementCast::from(abstract_self);
|
||||
elem.set_attr(~"height", height.to_str())
|
||||
elem.set_uint_attribute("height", height)
|
||||
}
|
||||
|
||||
pub fn NaturalWidth(&self) -> u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue