mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
htmlimageelement: Reject decode promises on the current request mutation (#37828)
Follow the HTML specification and reject the pending image decode promises on any current request mutation. https://html.spec.whatwg.org/multipage/#updating-the-image-data (step 18) https://html.spec.whatwg.org/multipage/#dom-img-decode (step 3) Fulfill and reject image decode promises by queueing a global tasks on the DOM manipulation task source. Testing: Improvements in the following tests - html/semantics/embedded-content/the-img-element/decode/* Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
45fb0bac82
commit
4cbadde144
5 changed files with 58 additions and 48 deletions
|
@ -9,6 +9,7 @@ use crate::codegen::PrototypeList::proto_id_to_name;
|
|||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
/// <https://webidl.spec.whatwg.org/#dfn-error-names-table>
|
||||
#[derive(Clone, Debug, MallocSizeOf)]
|
||||
pub enum Error {
|
||||
/// IndexSizeError DOMException
|
||||
|
@ -67,6 +68,8 @@ pub enum Error {
|
|||
Operation,
|
||||
/// NotAllowedError DOMException
|
||||
NotAllowed,
|
||||
/// EncodingError DOMException
|
||||
Encoding,
|
||||
|
||||
/// TypeError JavaScript Error
|
||||
Type(String),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue