mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove parsed attribute 'background' field on HTMLBodyElement
https://github.com/servo/servo/issues/7863
This commit is contained in:
parent
9a1fd472ab
commit
1a808219a8
3 changed files with 40 additions and 18 deletions
|
@ -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) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue