mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Allow image prefetching to occur during parsing when no window or document is present. Fixes #939.
This commit is contained in:
parent
34f740396e
commit
21b0fc35b6
4 changed files with 47 additions and 35 deletions
|
@ -166,10 +166,18 @@ impl<'self> Element {
|
|||
|
||||
//XXXjdm We really need something like a vtable so we can call AfterSetAttr.
|
||||
// This hardcoding is awful.
|
||||
if abstract_self.is_iframe_element() {
|
||||
do abstract_self.with_mut_iframe_element |iframe| {
|
||||
iframe.AfterSetAttr(raw_name, raw_value);
|
||||
match abstract_self.type_id() {
|
||||
ElementNodeTypeId(HTMLImageElementTypeId) => {
|
||||
do abstract_self.with_mut_image_element |image| {
|
||||
image.AfterSetAttr(raw_name, raw_value);
|
||||
}
|
||||
}
|
||||
ElementNodeTypeId(HTMLIframeElementTypeId) => {
|
||||
do abstract_self.with_mut_iframe_element |iframe| {
|
||||
iframe.AfterSetAttr(raw_name, raw_value);
|
||||
}
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
|
||||
match self.parent.owner_doc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue