diff --git a/Libraries/LibWeb/HTML/HTMLAudioElement.cpp b/Libraries/LibWeb/HTML/HTMLAudioElement.cpp index e6bfd27b7d6..b21b4fb85ac 100644 --- a/Libraries/LibWeb/HTML/HTMLAudioElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLAudioElement.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -33,6 +34,13 @@ JS::GCPtr HTMLAudioElement::create_layout_node(CSS::StylePropertie return heap().allocate_without_realm(document(), *this, move(style)); } +void HTMLAudioElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + Layout::AudioBox* HTMLAudioElement::layout_node() { return static_cast(Node::layout_node()); diff --git a/Libraries/LibWeb/HTML/HTMLAudioElement.h b/Libraries/LibWeb/HTML/HTMLAudioElement.h index e43f9cf0697..2056a18d98d 100644 --- a/Libraries/LibWeb/HTML/HTMLAudioElement.h +++ b/Libraries/LibWeb/HTML/HTMLAudioElement.h @@ -26,6 +26,7 @@ private: virtual void initialize(JS::Realm&) override; virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; virtual void on_playing() override; virtual void on_paused() override; diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.cpp b/Libraries/LibWeb/HTML/HTMLBRElement.cpp index 37e2869874f..76fddcfeedc 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLBRElement.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -31,4 +32,11 @@ JS::GCPtr HTMLBRElement::create_layout_node(CSS::StyleProperties s return heap().allocate_without_realm(document(), *this, move(style)); } +void HTMLBRElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + } diff --git a/Libraries/LibWeb/HTML/HTMLBRElement.h b/Libraries/LibWeb/HTML/HTMLBRElement.h index 4483de9297b..afddaf81a32 100644 --- a/Libraries/LibWeb/HTML/HTMLBRElement.h +++ b/Libraries/LibWeb/HTML/HTMLBRElement.h @@ -18,6 +18,7 @@ public: virtual ~HTMLBRElement() override; virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; private: virtual bool is_html_br_element() const override { return true; } diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp index 9f9ca5d2ede..7848d958fd9 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -134,6 +135,13 @@ JS::GCPtr HTMLCanvasElement::create_layout_node(CSS::StyleProperti return heap().allocate_without_realm(document(), *this, move(style)); } +void HTMLCanvasElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + HTMLCanvasElement::HasOrCreatedContext HTMLCanvasElement::create_2d_context() { if (!m_context.has()) diff --git a/Libraries/LibWeb/HTML/HTMLCanvasElement.h b/Libraries/LibWeb/HTML/HTMLCanvasElement.h index 786c6f7dfde..4096f5cb56e 100644 --- a/Libraries/LibWeb/HTML/HTMLCanvasElement.h +++ b/Libraries/LibWeb/HTML/HTMLCanvasElement.h @@ -49,6 +49,7 @@ private: virtual void apply_presentational_hints(CSS::StyleProperties&) const override; virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; enum class HasOrCreatedContext { No, diff --git a/Libraries/LibWeb/HTML/HTMLElement.cpp b/Libraries/LibWeb/HTML/HTMLElement.cpp index a172759bbfe..69997405dd8 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -907,6 +908,15 @@ WebIDL::ExceptionOr HTMLElement::set_popover(Optional value) return {}; } +void HTMLElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (local_name() == HTML::TagNames::wbr) { + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); + } +} + void HTMLElement::did_receive_focus() { if (m_content_editable_state != ContentEditableState::True) diff --git a/Libraries/LibWeb/HTML/HTMLElement.h b/Libraries/LibWeb/HTML/HTMLElement.h index 6e29a48b105..1f46a9f9c5c 100644 --- a/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Libraries/LibWeb/HTML/HTMLElement.h @@ -91,6 +91,8 @@ protected: private: virtual bool is_html_element() const final { return true; } + virtual void adjust_computed_style(CSS::StyleProperties&) override; + // ^HTML::GlobalEventHandlers virtual JS::GCPtr global_event_handlers_to_event_target(FlyString const&) override { return *this; } virtual void did_receive_focus() override; diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp b/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp index 4182abad500..ca549898e39 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -59,4 +60,11 @@ void HTMLEmbedElement::apply_presentational_hints(CSS::StyleProperties& style) c }); } +void HTMLEmbedElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + } diff --git a/Libraries/LibWeb/HTML/HTMLEmbedElement.h b/Libraries/LibWeb/HTML/HTMLEmbedElement.h index 544d2defc07..a48621bd2c2 100644 --- a/Libraries/LibWeb/HTML/HTMLEmbedElement.h +++ b/Libraries/LibWeb/HTML/HTMLEmbedElement.h @@ -23,6 +23,7 @@ private: virtual bool is_html_embed_element() const override { return true; } virtual void initialize(JS::Realm&) override; virtual void apply_presentational_hints(CSS::StyleProperties&) const override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; }; } diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.cpp b/Libraries/LibWeb/HTML/HTMLFrameElement.cpp index 2330700723f..e5694a6b1f4 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -81,6 +82,13 @@ i32 HTMLFrameElement::default_tab_index_value() const return 0; } +void HTMLFrameElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + // https://html.spec.whatwg.org/multipage/obsolete.html#process-the-frame-attributes void HTMLFrameElement::process_the_frame_attributes(bool initial_insertion) { diff --git a/Libraries/LibWeb/HTML/HTMLFrameElement.h b/Libraries/LibWeb/HTML/HTMLFrameElement.h index ea326b972c9..f8da486203d 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameElement.h @@ -28,6 +28,7 @@ private: virtual void removed_from(Node*) override; virtual void attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value) override; virtual i32 default_tab_index_value() const override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; void process_the_frame_attributes(bool initial_insertion = false); }; diff --git a/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp b/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp index f3224131d44..8f788c86a4b 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -20,6 +21,13 @@ HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, DOM::Qualified HTMLFrameSetElement::~HTMLFrameSetElement() = default; +void HTMLFrameSetElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + void HTMLFrameSetElement::initialize(JS::Realm& realm) { Base::initialize(realm); diff --git a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h index 43b5d73ff92..3faa188c404 100644 --- a/Libraries/LibWeb/HTML/HTMLFrameSetElement.h +++ b/Libraries/LibWeb/HTML/HTMLFrameSetElement.h @@ -24,6 +24,8 @@ public: private: HTMLFrameSetElement(DOM::Document&, DOM::QualifiedName); + virtual void adjust_computed_style(CSS::StyleProperties&) override; + virtual void initialize(JS::Realm&) override; virtual void attribute_changed(FlyString const&, Optional const& old_value, Optional const&) override; diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index 0ebafd90a69..997e3c1bdfc 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,13 @@ JS::GCPtr HTMLIFrameElement::create_layout_node(CSS::StyleProperti return heap().allocate_without_realm(document(), *this, move(style)); } +void HTMLIFrameElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + void HTMLIFrameElement::attribute_changed(FlyString const& name, Optional const& old_value, Optional const& value) { HTMLElement::attribute_changed(name, old_value, value); diff --git a/Libraries/LibWeb/HTML/HTMLIFrameElement.h b/Libraries/LibWeb/HTML/HTMLIFrameElement.h index 432f6d8d82d..35ae1f4a2be 100644 --- a/Libraries/LibWeb/HTML/HTMLIFrameElement.h +++ b/Libraries/LibWeb/HTML/HTMLIFrameElement.h @@ -24,6 +24,7 @@ public: virtual ~HTMLIFrameElement() override; virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; void set_current_navigation_was_lazy_loaded(bool value); diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Libraries/LibWeb/HTML/HTMLImageElement.cpp index e8883815831..a111fb585b9 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -116,6 +117,13 @@ JS::GCPtr HTMLImageElement::create_layout_node(CSS::StylePropertie return heap().allocate_without_realm(document(), *this, move(style), *this); } +void HTMLImageElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + RefPtr HTMLImageElement::immutable_bitmap() const { return current_image_bitmap(); diff --git a/Libraries/LibWeb/HTML/HTMLImageElement.h b/Libraries/LibWeb/HTML/HTMLImageElement.h index 0252894a2a7..d0f6bf3b071 100644 --- a/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -131,6 +131,7 @@ private: virtual bool supports_dimension_attributes() const override { return true; } virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; virtual void did_set_viewport_rect(CSSPixelRect const&) override; diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index da9656393c6..aa77427b921 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -135,6 +135,10 @@ void HTMLInputElement::adjust_computed_style(CSS::StyleProperties& style) if (type_state() == TypeAttributeState::Hidden || type_state() == TypeAttributeState::SubmitButton || type_state() == TypeAttributeState::Button || type_state() == TypeAttributeState::ResetButton || type_state() == TypeAttributeState::ImageButton || type_state() == TypeAttributeState::Checkbox || type_state() == TypeAttributeState::RadioButton) return; + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); + // AD-HOC: We rewrite `display: inline` to `display: inline-block`. // This is required for the internal shadow tree to work correctly in layout. if (style.display().is_inline_outside() && style.display().is_flow_inside()) diff --git a/Libraries/LibWeb/HTML/HTMLMeterElement.cpp b/Libraries/LibWeb/HTML/HTMLMeterElement.cpp index 541bb16336b..4a3234e740c 100644 --- a/Libraries/LibWeb/HTML/HTMLMeterElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLMeterElement.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -177,6 +178,13 @@ void HTMLMeterElement::removed_from(DOM::Node*) set_shadow_root(nullptr); } +void HTMLMeterElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + void HTMLMeterElement::create_shadow_tree_if_needed() { if (shadow_root()) diff --git a/Libraries/LibWeb/HTML/HTMLMeterElement.h b/Libraries/LibWeb/HTML/HTMLMeterElement.h index 1ac3d39d04d..2c7016487e0 100644 --- a/Libraries/LibWeb/HTML/HTMLMeterElement.h +++ b/Libraries/LibWeb/HTML/HTMLMeterElement.h @@ -37,6 +37,8 @@ public: virtual void inserted() override; virtual void removed_from(DOM::Node*) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; + // https://html.spec.whatwg.org/multipage/forms.html#category-label virtual bool is_labelable() const override { return true; } diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 18bc6218921..a7b3c738a7c 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -155,6 +156,13 @@ JS::GCPtr HTMLObjectElement::create_layout_node(CSS::StyleProperti return nullptr; } +void HTMLObjectElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + bool HTMLObjectElement::has_ancestor_media_element_or_object_element_not_showing_fallback_content() const { for (auto const* ancestor = parent(); ancestor; ancestor = ancestor->parent()) { diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.h b/Libraries/LibWeb/HTML/HTMLObjectElement.h index 5a17b596df6..87495db13ab 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.h +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.h @@ -59,6 +59,7 @@ private: virtual void apply_presentational_hints(CSS::StyleProperties&) const override; virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; bool has_ancestor_media_element_or_object_element_not_showing_fallback_content() const; diff --git a/Libraries/LibWeb/HTML/HTMLProgressElement.cpp b/Libraries/LibWeb/HTML/HTMLProgressElement.cpp index 025884af501..fdef7906fb7 100644 --- a/Libraries/LibWeb/HTML/HTMLProgressElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLProgressElement.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -98,6 +99,13 @@ void HTMLProgressElement::removed_from(DOM::Node*) set_shadow_root(nullptr); } +void HTMLProgressElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + void HTMLProgressElement::create_shadow_tree_if_needed() { if (shadow_root()) diff --git a/Libraries/LibWeb/HTML/HTMLProgressElement.h b/Libraries/LibWeb/HTML/HTMLProgressElement.h index 5bfc35e561b..b66c048806e 100644 --- a/Libraries/LibWeb/HTML/HTMLProgressElement.h +++ b/Libraries/LibWeb/HTML/HTMLProgressElement.h @@ -31,6 +31,8 @@ public: virtual void inserted() override; virtual void removed_from(DOM::Node*) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; + // https://html.spec.whatwg.org/multipage/forms.html#category-label virtual bool is_labelable() const override { return true; } diff --git a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index 185fb1b9ee3..2d7a2f0ea47 100644 --- a/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -66,6 +66,10 @@ void HTMLSelectElement::visit_edges(Cell::Visitor& visitor) void HTMLSelectElement::adjust_computed_style(CSS::StyleProperties& style) { + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); + // AD-HOC: We rewrite `display: inline` to `display: inline-block`. // This is required for the internal shadow tree to work correctly in layout. if (style.display().is_inline_outside() && style.display().is_flow_inside()) diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp index e0cef60d56f..fed3a3cafdd 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp @@ -43,6 +43,10 @@ HTMLTextAreaElement::~HTMLTextAreaElement() = default; void HTMLTextAreaElement::adjust_computed_style(CSS::StyleProperties& style) { + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); + // AD-HOC: We rewrite `display: inline` to `display: inline-block`. // This is required for the internal shadow tree to work correctly in layout. if (style.display().is_inline_outside() && style.display().is_flow_inside()) diff --git a/Libraries/LibWeb/HTML/HTMLVideoElement.cpp b/Libraries/LibWeb/HTML/HTMLVideoElement.cpp index 1a0a86cbb26..6b3aa056a9a 100644 --- a/Libraries/LibWeb/HTML/HTMLVideoElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLVideoElement.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -67,6 +68,13 @@ JS::GCPtr HTMLVideoElement::create_layout_node(CSS::StylePropertie return heap().allocate_without_realm(document(), *this, move(style)); } +void HTMLVideoElement::adjust_computed_style(CSS::StyleProperties& style) +{ + // https://drafts.csswg.org/css-display-3/#unbox + if (style.display().is_contents()) + style.set_property(CSS::PropertyID::Display, CSS::DisplayStyleValue::create(CSS::Display::from_short(CSS::Display::Short::None))); +} + Layout::VideoBox* HTMLVideoElement::layout_node() { return static_cast(Node::layout_node()); diff --git a/Libraries/LibWeb/HTML/HTMLVideoElement.h b/Libraries/LibWeb/HTML/HTMLVideoElement.h index 50c886643ec..b84e8aeb02b 100644 --- a/Libraries/LibWeb/HTML/HTMLVideoElement.h +++ b/Libraries/LibWeb/HTML/HTMLVideoElement.h @@ -61,6 +61,7 @@ private: virtual bool supports_dimension_attributes() const override { return true; } virtual JS::GCPtr create_layout_node(CSS::StyleProperties) override; + virtual void adjust_computed_style(CSS::StyleProperties&) override; virtual void on_playing() override; virtual void on_paused() override; diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-display/display-contents-suppression-dynamic-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-display/display-contents-suppression-dynamic-001-ref.html new file mode 100644 index 00000000000..07a5663748b --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-display/display-contents-suppression-dynamic-001-ref.html @@ -0,0 +1,5 @@ + + +CSS Test Reference + +

Test passes if you see nothing below.

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-display/display-contents-suppression-dynamic-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-display/display-contents-suppression-dynamic-001.html new file mode 100644 index 00000000000..28a9749be5c --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-display/display-contents-suppression-dynamic-001.html @@ -0,0 +1,16 @@ + + +CSS Test: display: contents unboxing works in presence of dynamic changes to the tree. + + + + +

Test passes if you see nothing below.

+ +