refactor(htmlhrelement.rs): color setter now uses macro

Changed the function in #L44-47 to a macro usage
This commit is contained in:
Rizky Luthfianto 2015-11-10 09:31:38 +07:00
parent b386008623
commit d0d2a64628

View file

@ -41,10 +41,7 @@ impl HTMLHRElementMethods for HTMLHRElement {
make_getter!(Color);
// https://html.spec.whatwg.org/multipage/#dom-hr-color
fn SetColor(&self, value: DOMString) {
self.upcast::<Element>()
.set_attribute(&atom!("color"), AttrValue::from_legacy_color(value));
}
make_legacy_color_setter!(SetColor, "color");
}
pub trait HTMLHRLayoutHelpers {