mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Handle removing the src attribute from an img element (fixes #1469).
This commit is contained in:
parent
9faf2c89e4
commit
938f6baf9e
4 changed files with 11 additions and 4 deletions
|
@ -70,7 +70,9 @@ impl HTMLImageElement {
|
|||
let window = document.get().window.get();
|
||||
let image_cache = &window.image_cache_task;
|
||||
match value {
|
||||
None => {}
|
||||
None => {
|
||||
self.extra.image = None;
|
||||
}
|
||||
Some(src) => {
|
||||
let img_url = parse_url(src, url);
|
||||
self.extra.image = Some(img_url.clone());
|
||||
|
@ -95,9 +97,6 @@ impl HTMLImageElement {
|
|||
}
|
||||
|
||||
pub fn AfterRemoveAttr(&mut self, name: DOMString) {
|
||||
// FIXME (#1469):
|
||||
// This might not handle remove src attribute actually since
|
||||
// `self.update_image()` will see the missing src attribute and return early.
|
||||
if "src" == name {
|
||||
self.update_image(None, None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue