Remove parsed attribute 'background' field on HTMLBodyElement

https://github.com/servo/servo/issues/7863
This commit is contained in:
Corey Farwell 2016-01-02 16:32:09 -08:00
parent 9a1fd472ab
commit 1a808219a8
3 changed files with 40 additions and 18 deletions

View file

@ -152,6 +152,20 @@ macro_rules! make_bool_setter(
);
);
#[macro_export]
macro_rules! make_url_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
use dom::bindings::inheritance::Castable;
use dom::element::Element;
use dom::node::document_from_node;
let value = AttrValue::from_url(document_from_node(self).url(), value);
let element = self.upcast::<Element>();
element.set_attribute(&atom!($htmlname), value);
}
);
);
#[macro_export]
macro_rules! make_uint_setter(
($attr:ident, $htmlname:tt, $default:expr) => (