From d0d2a64628565c8723c3db2c98144fc17537adaf Mon Sep 17 00:00:00 2001 From: Rizky Luthfianto Date: Tue, 10 Nov 2015 09:31:38 +0700 Subject: [PATCH] refactor(htmlhrelement.rs): color setter now uses macro Changed the function in #L44-47 to a macro usage --- components/script/dom/htmlhrelement.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index 6f2362f592cd..eabd970c6f50 100644 --- a/components/script/dom/htmlhrelement.rs +++ b/components/script/dom/htmlhrelement.rs @@ -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::() - .set_attribute(&atom!("color"), AttrValue::from_legacy_color(value)); - } + make_legacy_color_setter!(SetColor, "color"); } pub trait HTMLHRLayoutHelpers {