Support base_url in stylesheet

This commit is contained in:
Youngmin Yoo 2014-02-19 15:52:58 +09:00
parent a12608d2e4
commit 7b56e75adb
5 changed files with 133 additions and 26 deletions

View file

@ -221,7 +221,9 @@ impl Element {
match local_name.as_slice() {
"style" => {
self.style_attribute = Some(style::parse_style_attribute(value))
let doc = self.node.owner_doc();
let base_url = doc.document().url.clone();
self.style_attribute = Some(style::parse_style_attribute(value, &base_url))
}
"id" if abstract_self.is_in_doc() => {
// XXX: this dual declaration are workaround to avoid the compile error: