From 1d048f4f6a147ab1f81893f370df3447b18075ec Mon Sep 17 00:00:00 2001 From: Taym Haddadi Date: Thu, 13 Jun 2024 12:15:49 +0200 Subject: [PATCH] Implement HTMLImageElement decode (#31269) * Implement HTMLImageElement decode Signed-off-by: Bentaimia Haddadi * Fix Decode doc link Signed-off-by: Bentaimia Haddadi * Temp * Decode HTML Image Signed-off-by: Bentaimia Haddadi * Fix doc link Signed-off-by: Bentaimia Haddadi * Move image decode to process_image_response_for_environment_change Signed-off-by: Bentaimia Haddadi * Update some wpt test result Signed-off-by: Bentaimia Haddadi * Handle multiple image decode promises Signed-off-by: Bentaimia Haddadi * Remove unnecessary promise calls Signed-off-by: Bentaimia Haddadi * Update more wpt test result Signed-off-by: Bentaimia Haddadi * Undo body-size-cross-origin.https.html.ini changes Signed-off-by: Bentaimia Haddadi * Reject decode when src and srcset are missing Signed-off-by: Bentaimia Haddadi * 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 * resolve decode promise in abort_request when request is CompletelyAvailable Signed-off-by: Bentaimia Haddadi * Update wpt test Signed-off-by: Bentaimia Haddadi * Move storing promise in decode task Signed-off-by: Bentaimia Haddadi * Remove the resolve logic from decode task Signed-off-by: Bentaimia Haddadi * 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 * Add comment to explain why resolve promise when state is CompletelyAvailable Signed-off-by: Bentaimia Haddadi --------- Signed-off-by: Bentaimia Haddadi --- components/script/dom/domexception.rs | 5 ++ components/script/dom/htmlimageelement.rs | 90 ++++++++++++++++++- .../dom/webidls/HTMLImageElement.webidl | 3 + .../html/dom/idlharness.https.html.ini | 6 -- .../image-decode-image-document.html.ini | 3 - .../decode/image-decode-path-changes.html.ini | 15 ---- .../decode/image-decode-picture.html.ini | 21 ----- .../image-decode-with-quick-attach.html.ini | 2 - .../decode/image-decode.html.ini | 36 -------- .../body-size-cross-origin.https.html.ini | 3 - .../meta/html/dom/idlharness.https.html.ini | 6 -- .../image-decode-image-document.html.ini | 3 - .../decode/image-decode-path-changes.html.ini | 15 ---- .../decode/image-decode-picture.html.ini | 21 ----- .../image-decode-with-quick-attach.html.ini | 2 - .../decode/image-decode.html.ini | 36 -------- .../body-size-cross-origin.https.html.ini | 3 - 17 files changed, 97 insertions(+), 173 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." diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs index b3c36fe5e27..1843bbf3e18 100644 --- a/components/script/dom/htmlimageelement.rs +++ b/components/script/dom/htmlimageelement.rs @@ -5,6 +5,7 @@ use std::cell::Cell; use std::collections::HashSet; use std::default::Default; +use std::rc::Rc; use std::sync::{Arc, Mutex}; use std::{char, i32, mem}; @@ -47,6 +48,8 @@ use style::values::specified::AbsoluteLength; use style_traits::ParsingMode; use url::Url; +use super::domexception::DOMErrorName; +use super::types::DOMException; use crate::document_loader::{LoadBlocker, LoadType}; use crate::dom::activation::Activatable; use crate::dom::attr::Attr; @@ -84,6 +87,7 @@ use crate::dom::node::{ UnbindContext, }; use crate::dom::performanceresourcetiming::InitiatorType; +use crate::dom::promise::Promise; use crate::dom::values::UNSIGNED_LONG_MAX; use crate::dom::virtualmethods::VirtualMethods; use crate::dom::window::Window; @@ -169,6 +173,8 @@ pub struct HTMLImageElement { #[ignore_malloc_size_of = "SourceSet"] source_set: DomRefCell, last_selected_source: DomRefCell>, + #[ignore_malloc_size_of = "promises are hard"] + image_decode_promises: DomRefCell>>, } impl HTMLImageElement { @@ -424,6 +430,7 @@ impl HTMLImageElement { LoadBlocker::terminate(&mut self.current_request.borrow_mut().blocker); // Mark the node dirty self.upcast::().dirty(NodeDamage::OtherNodeDamage); + self.resolve_image_decode_promises(); } /// Step 24 of @@ -525,6 +532,12 @@ impl HTMLImageElement { request.state = state; request.image = None; request.metadata = None; + + if matches!(state, State::Broken) { + self.reject_image_decode_promises(); + } else if matches!(state, State::CompletelyAvailable) { + self.resolve_image_decode_promises(); + } } /// @@ -1161,6 +1174,48 @@ impl HTMLImageElement { } } + // Step 2 for + fn react_to_decode_image_sync_steps(&self, promise: Rc) { + let document = document_from_node(self); + // Step 2.1 of + if !document.is_fully_active() || + matches!(self.current_request.borrow().state, State::Broken) + { + promise.reject_native(&DOMException::new( + &document.global(), + DOMErrorName::EncodingError, + )); + } else if matches!( + self.current_request.borrow().state, + State::CompletelyAvailable + ) { + // this doesn't follow the spec, but it's been discussed in + promise.resolve_native(&()); + } else { + self.image_decode_promises + .borrow_mut() + .push(promise.clone()); + } + } + + fn resolve_image_decode_promises(&self) { + for promise in self.image_decode_promises.borrow().iter() { + promise.resolve_native(&()); + } + self.image_decode_promises.borrow_mut().clear(); + } + + fn reject_image_decode_promises(&self) { + let document = document_from_node(self); + for promise in self.image_decode_promises.borrow().iter() { + promise.reject_native(&DOMException::new( + &document.global(), + DOMErrorName::EncodingError, + )); + } + self.image_decode_promises.borrow_mut().clear(); + } + /// Step 15 for fn finish_reacting_to_environment_change( &self, @@ -1249,6 +1304,7 @@ impl HTMLImageElement { generation: Default::default(), source_set: DomRefCell::new(SourceSet::new()), last_selected_source: DomRefCell::new(None), + image_decode_promises: DomRefCell::new(vec![]), } } @@ -1291,6 +1347,10 @@ impl HTMLImageElement { image.SetHeight(h); } + // run update_the_image_data when the element is created. + // https://html.spec.whatwg.org/multipage/#when-to-obtain-images + image.update_the_image_data(); + Ok(image) } pub fn areas(&self) -> Option>> { @@ -1347,6 +1407,11 @@ pub enum ImageElementMicrotask { elem: DomRoot, generation: u32, }, + DecodeTask { + elem: DomRoot, + #[ignore_malloc_size_of = "promises are hard"] + promise: Rc, + }, } impl MicrotaskRunnable for ImageElementMicrotask { @@ -1368,13 +1433,20 @@ impl MicrotaskRunnable for ImageElementMicrotask { } => { elem.react_to_environment_changes_sync_steps(*generation); }, + ImageElementMicrotask::DecodeTask { + ref elem, + ref promise, + } => { + elem.react_to_decode_image_sync_steps(promise.clone()); + }, } } fn enter_realm(&self) -> JSAutoRealm { match self { &ImageElementMicrotask::StableStateUpdateImageDataTask { ref elem, .. } | - &ImageElementMicrotask::EnvironmentChangesTask { ref elem, .. } => enter_realm(&**elem), + &ImageElementMicrotask::EnvironmentChangesTask { ref elem, .. } | + &ImageElementMicrotask::DecodeTask { ref elem, .. } => enter_realm(&**elem), } } } @@ -1607,6 +1679,22 @@ impl HTMLImageElementMethods for HTMLImageElement { } } + /// + fn Decode(&self) -> Rc { + // Step 1 + let promise = Promise::new(&self.global()); + + // Step 2 + let task = ImageElementMicrotask::DecodeTask { + elem: DomRoot::from_ref(self), + promise: promise.clone(), + }; + ScriptThread::await_stable_state(Microtask::ImageElement(task)); + + // Step 3 + promise + } + // https://html.spec.whatwg.org/multipage/#dom-img-name make_getter!(Name, "name"); diff --git a/components/script/dom/webidls/HTMLImageElement.webidl b/components/script/dom/webidls/HTMLImageElement.webidl index 0d242fefb26..faae1c8992b 100644 --- a/components/script/dom/webidls/HTMLImageElement.webidl +++ b/components/script/dom/webidls/HTMLImageElement.webidl @@ -29,6 +29,9 @@ interface HTMLImageElement : HTMLElement { readonly attribute USVString currentSrc; [CEReactions] attribute DOMString referrerPolicy; + + Promise decode(); + // also has obsolete members }; diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini index d36a263ba23..dfba023cc2b 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini @@ -3558,9 +3558,6 @@ [HTMLFrameElement interface: attribute frameBorder] expected: FAIL - [HTMLImageElement interface: new Image() must inherit property "decode()" with the proper type] - expected: FAIL - [HTMLTableColElement interface: document.createElement("col") must inherit property "width" with the proper type] expected: FAIL @@ -4248,9 +4245,6 @@ [HTMLInputElement interface: createInput("hidden") must inherit property "autocomplete" with the proper type] expected: FAIL - [HTMLImageElement interface: document.createElement("img") must inherit property "decode()" with the proper type] - expected: FAIL - [HTMLAreaElement interface: document.createElement("area") must inherit property "username" with the proper type] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini index 49544b02c2f..d8e39ae123d 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini @@ -1,5 +1,2 @@ [image-decode-image-document.html] - expected: ERROR - [HTMLImageElement.prototype.decode(), image document tests. Decode from iframe with image document, succeeds (img not loaded)] - expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini index ef5c0e07d74..438b60c8088 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini @@ -1,26 +1,11 @@ [image-decode-path-changes.html] type: testharness - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode.] - expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following good png decode succeeds.] expected: FAIL [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following good svg decode succeeds.] expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following bad decode fails.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes to the same path succeed.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode.] - expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode; following good decode succeeds.] expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode; following bad decode fails.] - expected: FAIL - diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini index e12814d7f38..f0b6a2c399c 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini @@ -1,26 +1,5 @@ [image-decode-picture.html] type: testharness - [HTMLImageElement.prototype.decode(), picture tests. Image with PNG source decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image with multiple sources decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image with PNG data URL source decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), picture tests. Image with SVG source decodes with undefined.] expected: FAIL - [HTMLImageElement.prototype.decode(), picture tests. Non-existent source fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Corrupt image in src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image without srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Multiple decodes for images with src succeed.] - expected: FAIL - diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini index 27790990a42..b1578afd1fe 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini @@ -1,4 +1,2 @@ [image-decode-with-quick-attach.html] - [HTMLImageElement.prototype.decode(), attach to DOM before promise resolves.] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini index 9c27df71eb3..5f8a178da5b 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini @@ -1,44 +1,8 @@ [image-decode.html] type: testharness - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG src decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG data URL src decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Image with SVG src decodes with undefined.] expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Non-existent src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Inactive document fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Adopted active image into inactive document fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Adopted inactive image into active document succeeds.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Corrupt image in src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image without src/srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Multiple decodes for images with src succeed.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG srcset decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Image with SVG srcset decodes with undefined.] expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Non-existent srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Multiple decodes for images with srcset succeed.] - expected: FAIL - diff --git a/tests/wpt/meta-legacy-layout/resource-timing/body-size-cross-origin.https.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/body-size-cross-origin.https.html.ini index f1aabdea4e7..c6d89589fd6 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/body-size-cross-origin.https.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/body-size-cross-origin.https.html.ini @@ -5,9 +5,6 @@ [Retrieving a same-origin resource with Timing-Allow-Origin should expose body size] expected: FAIL - [Retrieving a no-cors resource without Timing-Allow-Origin should not expose body size] - expected: FAIL - [Retrieving a no-cors resource with Timing-Allow-Origin should not expose body size] expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 23fba12decc..e44555f85b9 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -3381,9 +3381,6 @@ [HTMLFrameElement interface: attribute frameBorder] expected: FAIL - [HTMLImageElement interface: new Image() must inherit property "decode()" with the proper type] - expected: FAIL - [HTMLTableColElement interface: document.createElement("col") must inherit property "width" with the proper type] expected: FAIL @@ -4044,9 +4041,6 @@ [HTMLTableColElement interface: document.createElement("colgroup") must inherit property "chOff" with the proper type] expected: FAIL - [HTMLImageElement interface: document.createElement("img") must inherit property "decode()" with the proper type] - expected: FAIL - [HTMLAreaElement interface: document.createElement("area") must inherit property "username" with the proper type] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini index dd01286e4f9..a86c4d53f44 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-image-document.html.ini @@ -1,4 +1 @@ [image-decode-image-document.html] - expected: ERROR - [HTMLImageElement.prototype.decode(), image document tests. Decode from iframe with image document, succeeds (img not loaded)] - expected: TIMEOUT diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini index 8447494f35e..f27a0c3ca08 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-path-changes.html.ini @@ -1,24 +1,9 @@ [image-decode-path-changes.html] - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode.] - expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following good png decode succeeds.] expected: FAIL [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following good svg decode succeeds.] expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes fail decode; following bad decode fails.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. src changes to the same path succeed.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode.] - expected: FAIL - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode; following good decode succeeds.] expected: FAIL - - [HTMLImageElement.prototype.decode(), src/srcset mutation tests. srcset changes fail decode; following bad decode fails.] - expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini index f9693a647c7..3bb67b8a32a 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-picture.html.ini @@ -1,24 +1,3 @@ [image-decode-picture.html] - [HTMLImageElement.prototype.decode(), picture tests. Image with PNG source decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image with multiple sources decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image with PNG data URL source decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), picture tests. Image with SVG source decodes with undefined.] expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Non-existent source fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Corrupt image in src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Image without srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), picture tests. Multiple decodes for images with src succeed.] - expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini index d83015e717c..98172663628 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html.ini @@ -1,3 +1 @@ [image-decode-with-quick-attach.html] - [HTMLImageElement.prototype.decode(), attach to DOM before promise resolves.] - expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini index eb227e23376..2b608beafe7 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/decode/image-decode.html.ini @@ -1,42 +1,6 @@ [image-decode.html] - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG src decodes with undefined.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG data URL src decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Image with SVG src decodes with undefined.] expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Non-existent src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Inactive document fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Adopted active image into inactive document fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Adopted inactive image into active document succeeds.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Corrupt image in src fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image without src/srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Multiple decodes for images with src succeed.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Image with PNG srcset decodes with undefined.] - expected: FAIL - [HTMLImageElement.prototype.decode(), basic tests. Image with SVG srcset decodes with undefined.] expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Non-existent srcset fails decode.] - expected: FAIL - - [HTMLImageElement.prototype.decode(), basic tests. Multiple decodes for images with srcset succeed.] - expected: FAIL diff --git a/tests/wpt/meta/resource-timing/body-size-cross-origin.https.html.ini b/tests/wpt/meta/resource-timing/body-size-cross-origin.https.html.ini index f1aabdea4e7..c6d89589fd6 100644 --- a/tests/wpt/meta/resource-timing/body-size-cross-origin.https.html.ini +++ b/tests/wpt/meta/resource-timing/body-size-cross-origin.https.html.ini @@ -5,9 +5,6 @@ [Retrieving a same-origin resource with Timing-Allow-Origin should expose body size] expected: FAIL - [Retrieving a no-cors resource without Timing-Allow-Origin should not expose body size] - expected: FAIL - [Retrieving a no-cors resource with Timing-Allow-Origin should not expose body size] expected: FAIL