diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Libraries/LibWeb/HTML/HTMLImageElement.cpp index f0d11890ac8..032f668ca74 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,12 @@ void HTMLImageElement::adopted_from(DOM::Document& old_document) { old_document.unregister_viewport_client(*this); document().register_viewport_client(*this); + + if (m_document_observer) { + m_document_observer->set_document(document()); + if (!old_document.is_fully_active() && document().is_fully_active()) + m_document_observer->document_became_active()->function()(); + } } void HTMLImageElement::visit_edges(Cell::Visitor& visitor) @@ -81,6 +88,7 @@ void HTMLImageElement::visit_edges(Cell::Visitor& visitor) Base::visit_edges(visitor); visitor.visit(m_current_request); visitor.visit(m_pending_request); + visitor.visit(m_document_observer); visit_lazy_loading_element(visitor); } @@ -482,13 +490,42 @@ static BatchingDispatcher& batching_dispatcher() // https://html.spec.whatwg.org/multipage/images.html#update-the-image-data void HTMLImageElement::update_the_image_data(bool restart_animations, bool maybe_omit_events) { + auto& realm = this->realm(); + // 1. If the element's node document is not fully active, then: if (!document().is_fully_active()) { - // FIXME: 1. Continue running this algorithm in parallel. - // FIXME: 2. Wait until the element's node document is fully active. - // FIXME: 3. If another instance of this algorithm for this img element was started after this instance - // (even if it aborted and is no longer running), then return. - // FIXME: 4. Queue a microtask to continue this algorithm. + // 1. Continue running this algorithm in parallel. + // 2. Wait until the element's node document is fully active. + // 3. If another instance of this algorithm for this img element was started after this instance + // (even if it aborted and is no longer running), then return. + if (m_document_observer) + return; + + m_document_observer = realm.create(realm, document()); + m_document_observer->set_document_became_active([this, restart_animations, maybe_omit_events]() { + // 4. Queue a microtask to continue this algorithm. + queue_a_microtask(&document(), GC::create_function(this->heap(), [this, restart_animations, maybe_omit_events]() { + update_the_image_data_impl(restart_animations, maybe_omit_events); + })); + }); + + return; + } + + update_the_image_data_impl(restart_animations, maybe_omit_events); +} + +// https://html.spec.whatwg.org/multipage/images.html#update-the-image-data +void HTMLImageElement::update_the_image_data_impl(bool restart_animations, bool maybe_omit_events) +{ + // 1. If the element's node document is not fully active, then: + // FIXME: This step and it's substeps is implemented by the calling `update_the_image_data` function. + // By the time that we reach here, the document should be fully active. However, it is possible + // that the node document is swapped out again during the queue of the microtask to run this + // algorithm. + if (!document().is_fully_active()) { + dbgln("FIXME: Node document is not fully active running 'update the image data'"); + return; } // 2. FIXME: If the user agent cannot support images, or its support for images has been disabled, diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.h b/Libraries/LibWeb/HTML/HTMLImageElement.h index d4e547efa66..f9aa3660390 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -114,6 +114,8 @@ public: private: HTMLImageElement(DOM::Document&, DOM::QualifiedName); + void update_the_image_data_impl(bool restart_the_animations = false, bool maybe_omit_events = false); + virtual bool is_html_image_element() const override { return true; } virtual void initialize(JS::Realm&) override; @@ -144,6 +146,8 @@ private: Optional m_load_event_delayer; + GC::Ptr m_document_observer; + CORSSettingAttribute m_cors_setting { CORSSettingAttribute::NoCORS }; // https://html.spec.whatwg.org/multipage/images.html#last-selected-source diff --git a/Tests/LibWeb/Layout/expected/HTMLImageElement-update-the-image-data-temporary-document.txt b/Tests/LibWeb/Layout/expected/HTMLImageElement-update-the-image-data-temporary-document.txt new file mode 100644 index 00000000000..a8520c1ab91 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/HTMLImageElement-update-the-image-data-temporary-document.txt @@ -0,0 +1,19 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x166 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x150 children: not-inline + BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline + TextNode <#text> + BlockContainer at (8,8) content-size 784x150 children: inline + frag 0 from ImageBox start: 0, length: 0, rect: [8,8 150x150] baseline: 150 + ImageBox at (8,8) content-size 150x150 children: not-inline + BlockContainer <(anonymous)> at (8,158) content-size 784x0 children: inline + TextNode <#text> + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x166] + PaintableWithLines (BlockContainer) [8,8 784x150] + PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0] + PaintableWithLines (BlockContainer
#image-container) [8,8 784x150] + ImagePaintable (ImageBox) [8,8 150x150] + PaintableWithLines (BlockContainer(anonymous)) [8,158 784x0] diff --git a/Tests/LibWeb/Layout/input/HTMLImageElement-update-the-image-data-temporary-document.html b/Tests/LibWeb/Layout/input/HTMLImageElement-update-the-image-data-temporary-document.html new file mode 100644 index 00000000000..6e8f26ac88b --- /dev/null +++ b/Tests/LibWeb/Layout/input/HTMLImageElement-update-the-image-data-temporary-document.html @@ -0,0 +1,8 @@ + + +
Original content
+ + + diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.txt new file mode 100644 index 00000000000..b95e914d6e7 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.txt @@ -0,0 +1,234 @@ +Harness status: OK + +Found 228 tests + +44 Pass +184 Fail +Pass raster image +Pass raster image (when not rendered) +Pass raster image with width/height attributes +Pass raster image with width/height attributes (when not rendered) +Pass non existent image, no natural dimensions +Pass non existent image, no natural dimensions (when not rendered) +Pass non existent image with width/height attributes, no natural dimensions +Pass non existent image with width/height attributes, no natural dimensions (when not rendered) +Fail SVG image, no natural dimensions +Fail SVG image, no natural dimensions (when not rendered) +Fail SVG image with width/height attrs, no natural dimensions +Fail SVG image with width/height attrs, no natural dimensions (when not rendered) +Fail SVG image with width attr, no natural dimensions +Fail SVG image with width attr, no natural dimensions (when not rendered) +Fail SVG image with height attr, no natural dimensions +Fail SVG image with height attr, no natural dimensions (when not rendered) +Fail SVG image, percengage natural dimensions +Fail SVG image, percengage natural dimensions (when not rendered) +Fail SVG image, negative percengage natural dimensions +Fail SVG image, negative percengage natural dimensions (when not rendered) +Fail SVG image, with natural width +Fail SVG image, with natural width (when not rendered) +Fail SVG image, with natural height +Fail SVG image, with natural height (when not rendered) +Fail SVG image, with natural width of 0 +Fail SVG image, with natural width of 0 (when not rendered) +Fail SVG image, with natural height of 0 +Fail SVG image, with natural height of 0 (when not rendered) +Fail SVG image, with natural width being negative +Fail SVG image, with natural width being negative (when not rendered) +Fail SVG image, with natural height being negative +Fail SVG image, with natural height being negative (when not rendered) +Fail SVG image, no natural dimensions, and aspect ratio from viewBox +Fail SVG image, no natural dimensions, and aspect ratio from viewBox (when not rendered) +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox (when not rendered) +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural width, and aspect ratio from viewBox +Fail SVG image, with natural width, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural height, and aspect ratio from viewBox +Fail SVG image, with natural height, and aspect ratio from viewBox (when not rendered) +Pass SVG image, with natural width of 0, and aspect ratio from viewBox +Pass SVG image, with natural width of 0, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural height of 0, and aspect ratio from viewBox +Pass SVG image, with natural height of 0, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural width being negative, and aspect ratio from viewBox +Pass SVG image, with natural width being negative, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural height being negative, and aspect ratio from viewBox +Pass SVG image, with natural height being negative, and aspect ratio from viewBox (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width/height +Fail SVG image, no natural dimensions, viewBox with 0 width/height (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width +Fail SVG image, no natural dimensions, viewBox with 0 width (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 height +Fail SVG image, no natural dimensions, viewBox with 0 height (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width/height +Fail SVG image, with natural width, viewBox with 0 width/height (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width +Fail SVG image, with natural width, viewBox with 0 width (when not rendered) +Fail SVG image, with natural width, viewBox with 0 height +Fail SVG image, with natural width, viewBox with 0 height (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width/height +Fail SVG image, with natural height, viewBox with 0 width/height (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width +Fail SVG image, with natural height, viewBox with 0 width (when not rendered) +Fail SVG image, with natural height, viewBox with 0 height +Fail SVG image, with natural height, viewBox with 0 height (when not rendered) +Fail SVG image, with natural width and height +Fail SVG image, with natural width and height (when not rendered) +Fail SVG image, with natural width and height, and aspect ratio from viewBox +Fail SVG image, with natural width and height, and aspect ratio from viewBox (when not rendered) +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox (when not rendered) +Fail SVG image, with natural width and height being negative, and aspect ratio from viewBox +Pass SVG image, with natural width and height being negative, and aspect ratio from viewBox (when not rendered) +Pass raster image (with srcset/1x) +Pass raster image (with srcset/1x) (when not rendered) +Pass raster image with width/height attributes (with srcset/1x) +Pass raster image with width/height attributes (with srcset/1x) (when not rendered) +Pass non existent image, no natural dimensions (with srcset/1x) +Pass non existent image, no natural dimensions (with srcset/1x) (when not rendered) +Pass non existent image with width/height attributes, no natural dimensions (with srcset/1x) +Pass non existent image with width/height attributes, no natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image, no natural dimensions (with srcset/1x) +Fail SVG image, no natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image with width/height attrs, no natural dimensions (with srcset/1x) +Fail SVG image with width/height attrs, no natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image with width attr, no natural dimensions (with srcset/1x) +Fail SVG image with width attr, no natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image with height attr, no natural dimensions (with srcset/1x) +Fail SVG image with height attr, no natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image, percengage natural dimensions (with srcset/1x) +Fail SVG image, percengage natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image, negative percengage natural dimensions (with srcset/1x) +Fail SVG image, negative percengage natural dimensions (with srcset/1x) (when not rendered) +Fail SVG image, with natural width (with srcset/1x) +Fail SVG image, with natural width (with srcset/1x) (when not rendered) +Fail SVG image, with natural height (with srcset/1x) +Fail SVG image, with natural height (with srcset/1x) (when not rendered) +Fail SVG image, with natural width of 0 (with srcset/1x) +Fail SVG image, with natural width of 0 (with srcset/1x) (when not rendered) +Fail SVG image, with natural height of 0 (with srcset/1x) +Fail SVG image, with natural height of 0 (with srcset/1x) (when not rendered) +Fail SVG image, with natural width being negative (with srcset/1x) +Fail SVG image, with natural width being negative (with srcset/1x) (when not rendered) +Fail SVG image, with natural height being negative (with srcset/1x) +Fail SVG image, with natural height being negative (with srcset/1x) (when not rendered) +Fail SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Pass SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x) +Fail SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x) +Fail SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x) +Fail SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width/height (with srcset/1x) +Fail SVG image, with natural width, viewBox with 0 width/height (with srcset/1x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width (with srcset/1x) +Fail SVG image, with natural width, viewBox with 0 width (with srcset/1x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 height (with srcset/1x) +Fail SVG image, with natural width, viewBox with 0 height (with srcset/1x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width/height (with srcset/1x) +Fail SVG image, with natural height, viewBox with 0 width/height (with srcset/1x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width (with srcset/1x) +Fail SVG image, with natural height, viewBox with 0 width (with srcset/1x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 height (with srcset/1x) +Fail SVG image, with natural height, viewBox with 0 height (with srcset/1x) (when not rendered) +Fail SVG image, with natural width and height (with srcset/1x) +Fail SVG image, with natural width and height (with srcset/1x) (when not rendered) +Fail SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/1x) +Fail SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/1x) +Pass SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/1x) (when not rendered) +Fail raster image (with srcset/2x) +Fail raster image (with srcset/2x) (when not rendered) +Fail raster image with width/height attributes (with srcset/2x) +Fail raster image with width/height attributes (with srcset/2x) (when not rendered) +Pass non existent image, no natural dimensions (with srcset/2x) +Pass non existent image, no natural dimensions (with srcset/2x) (when not rendered) +Pass non existent image with width/height attributes, no natural dimensions (with srcset/2x) +Pass non existent image with width/height attributes, no natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image, no natural dimensions (with srcset/2x) +Fail SVG image, no natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image with width/height attrs, no natural dimensions (with srcset/2x) +Fail SVG image with width/height attrs, no natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image with width attr, no natural dimensions (with srcset/2x) +Fail SVG image with width attr, no natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image with height attr, no natural dimensions (with srcset/2x) +Fail SVG image with height attr, no natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image, percengage natural dimensions (with srcset/2x) +Fail SVG image, percengage natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image, negative percengage natural dimensions (with srcset/2x) +Fail SVG image, negative percengage natural dimensions (with srcset/2x) (when not rendered) +Fail SVG image, with natural width (with srcset/2x) +Fail SVG image, with natural width (with srcset/2x) (when not rendered) +Fail SVG image, with natural height (with srcset/2x) +Fail SVG image, with natural height (with srcset/2x) (when not rendered) +Fail SVG image, with natural width of 0 (with srcset/2x) +Fail SVG image, with natural width of 0 (with srcset/2x) (when not rendered) +Fail SVG image, with natural height of 0 (with srcset/2x) +Fail SVG image, with natural height of 0 (with srcset/2x) (when not rendered) +Fail SVG image, with natural width being negative (with srcset/2x) +Fail SVG image, with natural width being negative (with srcset/2x) (when not rendered) +Fail SVG image, with natural height being negative (with srcset/2x) +Fail SVG image, with natural height being negative (with srcset/2x) (when not rendered) +Fail SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Pass SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x) +Fail SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x) +Fail SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x) (when not rendered) +Fail SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x) +Fail SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width/height (with srcset/2x) +Fail SVG image, with natural width, viewBox with 0 width/height (with srcset/2x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 width (with srcset/2x) +Fail SVG image, with natural width, viewBox with 0 width (with srcset/2x) (when not rendered) +Fail SVG image, with natural width, viewBox with 0 height (with srcset/2x) +Fail SVG image, with natural width, viewBox with 0 height (with srcset/2x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width/height (with srcset/2x) +Fail SVG image, with natural height, viewBox with 0 width/height (with srcset/2x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 width (with srcset/2x) +Fail SVG image, with natural height, viewBox with 0 width (with srcset/2x) (when not rendered) +Fail SVG image, with natural height, viewBox with 0 height (with srcset/2x) +Fail SVG image, with natural height, viewBox with 0 height (with srcset/2x) (when not rendered) +Fail SVG image, with natural width and height (with srcset/2x) +Fail SVG image, with natural width and height (with srcset/2x) (when not rendered) +Fail SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x) +Fail SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/2x) (when not rendered) +Fail SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/2x) +Pass SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/2x) (when not rendered) \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html b/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html new file mode 100644 index 00000000000..d89d92ffd3c --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html @@ -0,0 +1,377 @@ + + + +HTMLImageElement attributes naturalWidth, naturalHeight, width, height + + + + + + + + + + + + + +
+
+
+
+ + + diff --git a/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/resources/cat.jpg b/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/resources/cat.jpg new file mode 100644 index 00000000000..a4f14f54d60 Binary files /dev/null and b/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/resources/cat.jpg differ