mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Temp
This commit is contained in:
parent
dba5daddeb
commit
781fda5b6d
1 changed files with 9 additions and 2 deletions
|
@ -1616,12 +1616,19 @@ impl HTMLImageElementMethods for HTMLImageElement {
|
|||
|
||||
// Step 2
|
||||
let document = document_from_node(self);
|
||||
if !document.is_fully_active() {
|
||||
let ready = match self.current_request.borrow().state {
|
||||
State::Unavailable => false,
|
||||
State::PartiallyAvailable => false,
|
||||
State::CompletelyAvailable => true,
|
||||
State::Broken => false,
|
||||
};
|
||||
|
||||
if document.is_fully_active() && ready && self.current_request.borrow().image.is_some() {
|
||||
promise.reject_native(&DOMException::new(
|
||||
&self.global(),
|
||||
DOMErrorName::EncodingError,
|
||||
));
|
||||
} else if self.current_request.borrow().image.is_some() {
|
||||
} else {
|
||||
promise.resolve_native(&());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue