diff options
author | Taym Haddadi <haddadi.taym@gmail.com> | 2024-06-13 12:15:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 10:15:49 +0000 |
commit | 1d048f4f6a147ab1f81893f370df3447b18075ec (patch) | |
tree | 028fa6776ad105608c28dc9fa6c415230576edf0 /components/script/dom/domexception.rs | |
parent | 43df0a48ee3b7786c86d6f000e5f6acc990b61de (diff) | |
download | servo-1d048f4f6a147ab1f81893f370df3447b18075ec.tar.gz servo-1d048f4f6a147ab1f81893f370df3447b18075ec.zip |
Implement HTMLImageElement decode (#31269)
* Implement HTMLImageElement decode
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix Decode doc link
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Temp
* Decode HTML Image
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix doc link
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Move image decode to process_image_response_for_environment_change
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update some wpt test result
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Handle multiple image decode promises
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove unnecessary promise calls
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update more wpt test result
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Undo body-size-cross-origin.https.html.ini changes
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Reject decode when src and srcset are missing
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Revert "Reject decode when src and srcset are missing"
This reverts commit 1b57ab978f9fc24facafc8af97ee8851d5142533.
* Drain promises vec and run update_the_image_data when element is created
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* resolve decode promise in abort_request when request is CompletelyAvailable
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update wpt test
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Move storing promise in decode task
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove the resolve logic from decode task
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Revert "Remove the resolve logic from decode task"
This reverts commit eee6096d50dbe46a22a5bbfd7f15c03988ed2f4b.
* reject or reject current promise before storing it
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Add comment to explain why resolve promise when state is CompletelyAvailable
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r-- | components/script/dom/domexception.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index c058136a8b5..2267148626f 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -41,6 +41,7 @@ pub enum DOMErrorName { TimeoutError = DOMExceptionConstants::TIMEOUT_ERR, InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR, DataCloneError = DOMExceptionConstants::DATA_CLONE_ERR, + EncodingError, NotReadableError, OperationError, } @@ -70,6 +71,7 @@ impl DOMErrorName { "TimeoutError" => Some(DOMErrorName::TimeoutError), "InvalidNodeTypeError" => Some(DOMErrorName::InvalidNodeTypeError), "DataCloneError" => Some(DOMErrorName::DataCloneError), + "EncodingError" => Some(DOMErrorName::EncodingError), "NotReadableError" => Some(DOMErrorName::NotReadableError), "OperationError" => Some(DOMErrorName::OperationError), _ => None, @@ -115,6 +117,9 @@ impl DOMException { "The supplied node is incorrect or has an incorrect ancestor for this operation." }, DOMErrorName::DataCloneError => "The object can not be cloned.", + DOMErrorName::EncodingError => { + "The encoding operation (either encoded or decoding) failed." + }, DOMErrorName::NotReadableError => "The I/O read operation failed.", DOMErrorName::OperationError => { "The operation failed for an operation-specific reason." |