diff options
author | Rizky Luthfianto <mrluthfianto@gmail.com> | 2015-11-10 09:31:38 +0700 |
---|---|---|
committer | Rizky Luthfianto <mrluthfianto@gmail.com> | 2015-11-10 09:31:38 +0700 |
commit | d0d2a64628565c8723c3db2c98144fc17537adaf (patch) | |
tree | 2b3c3473cd0874e9c2a4d2de38babb43a5f686b6 | |
parent | b386008623132deca21049f125ac761b20edc1dd (diff) | |
download | servo-d0d2a64628565c8723c3db2c98144fc17537adaf.tar.gz servo-d0d2a64628565c8723c3db2c98144fc17537adaf.zip |
refactor(htmlhrelement.rs): color setter now uses macro
Changed the function in #L44-47 to a macro usage
-rw-r--r-- | components/script/dom/htmlhrelement.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs index 6f2362f592c..eabd970c6f5 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::<Element>() - .set_attribute(&atom!("color"), AttrValue::from_legacy_color(value)); - } + make_legacy_color_setter!(SetColor, "color"); } pub trait HTMLHRLayoutHelpers { |