diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index c85d01e4b87..74089fb424e 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -762,6 +762,36 @@ void HTMLInputElement::commit_pending_changes() dispatch_event(change_event); } +// https://www.w3.org/TR/css-ui-4/#input-rules +static GC::Ref inner_text_style_when_visible() +{ + static GC::Root style; + if (!style) { + style = CSS::CSSStyleProperties::create(internal_css_realm(), {}, {}); + style->set_declarations_from_text(R"~~~( + width: 100%; + height: 1lh; + align-items: center; + text-overflow: clip; + white-space: nowrap; + )~~~"sv); + } + return *style; +} + +static GC::Ref inner_text_style_when_hidden() +{ + static GC::Root style; + if (!style) { + style = CSS::CSSStyleProperties::create(internal_css_realm(), {}, {}); + style->set_declarations_from_text(R"~~~( + width: 0; + display: inline; + )~~~"sv); + } + return *style; +} + static GC::Ref placeholder_style_when_visible() { static GC::Root style; @@ -772,7 +802,7 @@ static GC::Ref placeholder_style_when_visible() align-items: center; text-overflow: clip; white-space: nowrap; - display: block; + display: inline; )~~~"sv); } return *style; @@ -792,10 +822,13 @@ void HTMLInputElement::update_placeholder_visibility() { if (!m_placeholder_element) return; - if (this->placeholder_value().has_value()) + if (this->placeholder_value().has_value()) { + m_inner_text_element->set_inline_style(inner_text_style_when_hidden()); m_placeholder_element->set_inline_style(placeholder_style_when_visible()); - else + } else { + m_inner_text_element->set_inline_style(inner_text_style_when_visible()); m_placeholder_element->set_inline_style(placeholder_style_when_hidden()); + } } Utf16String HTMLInputElement::button_label() const @@ -1011,7 +1044,6 @@ void HTMLInputElement::create_text_input_shadow_tree() auto shadow_root = realm().create(document(), *this, Bindings::ShadowRootMode::Closed); set_shadow_root(shadow_root); - auto initial_value = m_value; auto element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); { static GC::Root style; @@ -1030,15 +1062,6 @@ void HTMLInputElement::create_text_input_shadow_tree() } MUST(shadow_root->append_child(element)); - m_placeholder_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); - m_placeholder_element->set_use_pseudo_element(CSS::PseudoElement::Placeholder); - update_placeholder_visibility(); - - MUST(element->append_child(*m_placeholder_element)); - - m_placeholder_text_node = realm().create(document(), Utf16String::from_utf8(placeholder())); - MUST(m_placeholder_element->append_child(*m_placeholder_text_node)); - // https://www.w3.org/TR/css-ui-4/#input-rules m_inner_text_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); { @@ -1057,12 +1080,20 @@ void HTMLInputElement::create_text_input_shadow_tree() } MUST(element->append_child(*m_inner_text_element)); - m_text_node = realm().create(document(), move(initial_value)); + m_text_node = realm().create(document(), Utf16String {}); if (type_state() == TypeAttributeState::Password) m_text_node->set_is_password_input({}, true); + m_text_node->set_text_content(m_value); handle_maxlength_attribute(); MUST(m_inner_text_element->append_child(*m_text_node)); + m_placeholder_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); + m_placeholder_element->set_use_pseudo_element(CSS::PseudoElement::Placeholder); + MUST(element->append_child(*m_placeholder_element)); + + m_placeholder_text_node = realm().create(document(), Utf16String::from_utf8(placeholder())); + MUST(m_placeholder_element->append_child(*m_placeholder_text_node)); + update_placeholder_visibility(); if (type_state() == TypeAttributeState::Number) { diff --git a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp index e1104f888ec..85639cde151 100644 --- a/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp @@ -344,13 +344,6 @@ void HTMLTextAreaElement::create_shadow_tree_if_needed() auto element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); MUST(shadow_root->append_child(element)); - m_placeholder_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); - m_placeholder_element->set_use_pseudo_element(CSS::PseudoElement::Placeholder); - MUST(element->append_child(*m_placeholder_element)); - - m_placeholder_text_node = realm().create(document(), Utf16String::from_utf8(get_attribute_value(HTML::AttributeNames::placeholder))); - MUST(m_placeholder_element->append_child(*m_placeholder_text_node)); - m_inner_text_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); MUST(element->append_child(*m_inner_text_element)); @@ -361,6 +354,13 @@ void HTMLTextAreaElement::create_shadow_tree_if_needed() handle_maxlength_attribute(); MUST(m_inner_text_element->append_child(*m_text_node)); + m_placeholder_element = MUST(DOM::create_element(document(), HTML::TagNames::div, Namespace::HTML)); + m_placeholder_element->set_use_pseudo_element(CSS::PseudoElement::Placeholder); + MUST(element->append_child(*m_placeholder_element)); + + m_placeholder_text_node = realm().create(document(), Utf16String::from_utf8(get_attribute_value(HTML::AttributeNames::placeholder))); + MUST(m_placeholder_element->append_child(*m_placeholder_text_node)); + update_placeholder_visibility(); } @@ -385,11 +385,11 @@ void HTMLTextAreaElement::update_placeholder_visibility() return; auto placeholder_text = get_attribute(AttributeNames::placeholder); if (placeholder_text.has_value() && m_text_node->data().is_empty()) { - MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "block"sv)); - MUST(m_inner_text_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"sv)); + MUST(m_inner_text_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "inline"sv)); + MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "inline"sv)); } else { - MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"sv)); MUST(m_inner_text_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "block"sv)); + MUST(m_placeholder_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"sv)); } } diff --git a/Libraries/LibWeb/Layout/InlineLevelIterator.cpp b/Libraries/LibWeb/Layout/InlineLevelIterator.cpp index 56aee61af0c..5c8c65ae687 100644 --- a/Libraries/LibWeb/Layout/InlineLevelIterator.cpp +++ b/Libraries/LibWeb/Layout/InlineLevelIterator.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -496,16 +497,29 @@ Optional InlineLevelIterator::next_without_lookahead( else m_text_node_context->is_first_chunk = false; - auto chunk_opt = m_text_node_context->chunk_iterator.next(); - if (!chunk_opt.has_value()) { - m_text_node_context = {}; - skip_to_next(); - return next_without_lookahead(); - } - if (!m_text_node_context->chunk_iterator.peek(0).has_value()) m_text_node_context->is_last_chunk = true; + auto chunk_opt = m_text_node_context->chunk_iterator.next(); + auto is_empty_editable = false; + if (!chunk_opt.has_value()) { + auto const is_only_chunk = m_text_node_context->is_first_chunk && m_text_node_context->is_last_chunk; + if (is_only_chunk && text_node->text_for_rendering().is_empty()) { + if (auto const* shadow_root = as_if(text_node->dom_node().root())) + if (auto const* form_associated_element = as_if(shadow_root->host())) + is_empty_editable = form_associated_element->is_mutable(); + is_empty_editable |= text_node->dom_node().parent() && text_node->dom_node().parent()->is_editing_host(); + } + + if (is_empty_editable) { + chunk_opt = m_text_node_context->chunk_iterator.create_empty_chunk(); + } else { + m_text_node_context = {}; + skip_to_next(); + return next_without_lookahead(); + } + } + auto& chunk = chunk_opt.value(); auto text_type = chunk.text_type; if (text_type == Gfx::GlyphRun::TextType::Ltr || text_type == Gfx::GlyphRun::TextType::Rtl) @@ -583,7 +597,7 @@ Optional InlineLevelIterator::next_without_lookahead( CSSPixels chunk_width = CSSPixels::nearest_value_for(glyph_run->width() + x); // NOTE: We never consider `content: ""` to be collapsible whitespace. - bool is_generated_empty_string = text_node->is_generated_for_pseudo_element() && chunk.length == 0; + bool is_generated_empty_string = is_empty_editable || (text_node->is_generated_for_pseudo_element() && chunk.length == 0); auto collapse_whitespace = m_text_node_context->chunk_iterator.should_collapse_whitespace(); Item item { diff --git a/Libraries/LibWeb/Layout/TextNode.cpp b/Libraries/LibWeb/Layout/TextNode.cpp index 271c8cfdf79..e992abbf454 100644 --- a/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Libraries/LibWeb/Layout/TextNode.cpp @@ -479,6 +479,16 @@ Optional TextNode::ChunkIterator::peek(size_t count) return m_peek_queue[count]; } +TextNode::Chunk TextNode::ChunkIterator::create_empty_chunk() +{ + return TextNode::Chunk { + .view = {}, + .font = m_font_cascade_list.first(), + .is_all_whitespace = true, + .text_type = Gfx::GlyphRun::TextType::Common, + }; +} + Optional TextNode::ChunkIterator::next_without_peek() { if (m_current_index >= m_view.length_in_code_units()) diff --git a/Libraries/LibWeb/Layout/TextNode.h b/Libraries/LibWeb/Layout/TextNode.h index cb03cad1c15..2e00850ecf6 100644 --- a/Libraries/LibWeb/Layout/TextNode.h +++ b/Libraries/LibWeb/Layout/TextNode.h @@ -52,6 +52,8 @@ public: Optional next(); Optional peek(size_t); + Chunk create_empty_chunk(); + private: Optional next_without_peek(); Optional try_commit_chunk(size_t start, size_t end, bool has_breaking_newline, bool has_breaking_tab, Gfx::Font const&, Gfx::GlyphRun::TextType) const; diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-leading-and-trailing-metrics.txt b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-leading-and-trailing-metrics.txt index 8483378f30f..3b79fe42d0a 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-leading-and-trailing-metrics.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/inline-block-leading-and-trailing-metrics.txt @@ -18,13 +18,13 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- BlockContainer <(anonymous)> at [8,28] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline TextNode <#text> (not painted) BlockContainer at [9,29] [0+1+0 782 0+1+0] [0+1+0 18 0+1+0] children: inline - frag 0 from BlockContainer start: 0, length: 0, rect: [70.296875,29 88.453125x18] baseline: 13.796875 + frag 0 from BlockContainer start: 0, length: 0, rect: [50.296875,29 88.453125x18] baseline: 13.796875 InlineNode at [9,29] [0+0+0 41.296875 20+0+0] [0+0+0 18 0+0+0] frag 0 from TextNode start: 0, length: 6, rect: [9,29 41.296875x18] baseline: 13.796875 "inline" TextNode <#text> (not painted) - BlockContainer at [70.296875,29] inline-block [0+0+0 88.453125 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline - frag 0 from TextNode start: 0, length: 12, rect: [70.296875,29 88.453125x18] baseline: 13.796875 + BlockContainer at [50.296875,29] inline-block [0+0+0 88.453125 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + frag 0 from TextNode start: 0, length: 12, rect: [50.296875,29 88.453125x18] baseline: 13.796875 "inline-block" TextNode <#text> (not painted) InlineNode at [158.75,29] [0+0+0 41.296875 0+0+0] [0+0+0 18 0+0+0] @@ -34,7 +34,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- BlockContainer <(anonymous)> at [8,48] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline TextNode <#text> (not painted) BlockContainer at [9,49] [0+1+0 782 0+1+0] [0+1+0 18 0+1+0] children: inline - frag 0 from BlockContainer start: 0, length: 0, rect: [131.59375,49 88.453125x18] baseline: 13.796875 + frag 0 from BlockContainer start: 0, length: 0, rect: [111.59375,49 88.453125x18] baseline: 13.796875 InlineNode at [9,49] [0+0+0 41.296875 0+0+0] [0+0+0 18 0+0+0] frag 0 from TextNode start: 0, length: 6, rect: [9,49 41.296875x18] baseline: 13.796875 "inline" @@ -43,8 +43,8 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- frag 0 from TextNode start: 0, length: 6, rect: [70.296875,49 41.296875x18] baseline: 13.796875 "inline" TextNode <#text> (not painted) - BlockContainer at [131.59375,49] inline-block [0+0+0 88.453125 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline - frag 0 from TextNode start: 0, length: 12, rect: [131.59375,49 88.453125x18] baseline: 13.796875 + BlockContainer at [111.59375,49] inline-block [0+0+0 88.453125 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + frag 0 from TextNode start: 0, length: 12, rect: [111.59375,49 88.453125x18] baseline: 13.796875 "inline-block" TextNode <#text> (not painted) BlockContainer <(anonymous)> at [8,68] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline @@ -64,7 +64,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer
#b) [8,28 784x20] PaintableWithLines (InlineNode) [9,29 61.296875x18] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer) [70.296875,29 88.453125x18] + PaintableWithLines (BlockContainer) [50.296875,29 88.453125x18] TextPaintable (TextNode<#text>) PaintableWithLines (InlineNode) [158.75,29 41.296875x18] TextPaintable (TextNode<#text>) @@ -74,7 +74,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] TextPaintable (TextNode<#text>) PaintableWithLines (InlineNode) [50.296875,49 81.296875x18] TextPaintable (TextNode<#text>) - PaintableWithLines (BlockContainer) [131.59375,49 88.453125x18] + PaintableWithLines (BlockContainer) [111.59375,49 88.453125x18] TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer(anonymous)) [8,68 784x0] diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.txt b/Tests/LibWeb/Layout/expected/block-and-inline/leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.txt index 6dfabf6cc4d..dd2e3310bb8 100644 --- a/Tests/LibWeb/Layout/expected/block-and-inline/leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.txt +++ b/Tests/LibWeb/Layout/expected/block-and-inline/leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.txt @@ -5,8 +5,8 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- frag 0 from TextNode start: 1, length: 9, rect: [28,8 82.125x18] baseline: 13.796875 "Download " TextNode <#text> (not painted) - InlineNode
at [150.125,8] [20+0+0 39.5625 0+0+20] [0+0+0 18 0+0+0] - frag 0 from TextNode start: 1, length: 4, rect: [150.125,8 39.5625x18] baseline: 13.796875 + InlineNode
at [130.125,8] [20+0+0 39.5625 0+0+20] [0+0+0 18 0+0+0] + frag 0 from TextNode start: 1, length: 4, rect: [130.125,8 39.5625x18] baseline: 13.796875 "News" TextNode <#text> (not painted) TextNode <#text> (not painted) @@ -16,7 +16,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [8,8 784x18] PaintableWithLines (InlineNode
) [28,8 82.125x18] TextPaintable (TextNode<#text>) - PaintableWithLines (InlineNode
) [150.125,8 39.5625x18] + PaintableWithLines (InlineNode
) [130.125,8 39.5625x18] TextPaintable (TextNode<#text>) SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto) diff --git a/Tests/LibWeb/Layout/expected/css-appearance-none.txt b/Tests/LibWeb/Layout/expected/css-appearance-none.txt index 418d62535b2..4d748f9eaee 100644 --- a/Tests/LibWeb/Layout/expected/css-appearance-none.txt +++ b/Tests/LibWeb/Layout/expected/css-appearance-none.txt @@ -22,8 +22,9 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- BlockContainer at [13,10] inline-block [0+1+4 0 4+1+0] [0+1+1 18 1+1+0] [BFC] children: not-inline BlockContainer <(anonymous)> at [13,10] flex-container(column) [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [FFC] children: not-inline BlockContainer <(anonymous)> at [13,10] flex-item [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline - frag 0 from BlockContainer start: 0, length: 0, rect: [13,23 0x0] baseline: 0 - BlockContainer at [13,23] inline-block [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline + frag 0 from BlockContainer start: 0, length: 0, rect: [13,10 0x18] baseline: 13.796875 + BlockContainer at [13,10] inline-block [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + frag 0 from TextNode start: 0, length: 0, rect: [13,10 0x18] baseline: 13.796875 TextNode <#text> (not painted) TextNode <#text> (not painted) BreakNode
(not painted) @@ -31,8 +32,9 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not- BlockContainer at [13,32] inline-block [0+1+4 0 4+1+0] [0+1+1 18 1+1+0] [BFC] children: not-inline BlockContainer <(anonymous)> at [13,32] flex-container(column) [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [FFC] children: not-inline BlockContainer <(anonymous)> at [13,32] flex-item [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline - frag 0 from BlockContainer start: 0, length: 0, rect: [13,45 0x0] baseline: 0 - BlockContainer at [13,45] inline-block [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] [BFC] children: inline + frag 0 from BlockContainer start: 0, length: 0, rect: [13,32 0x18] baseline: 13.796875 + BlockContainer at [13,32] inline-block [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + frag 0 from TextNode start: 0, length: 0, rect: [13,32 0x18] baseline: 13.796875 TextNode <#text> (not painted) TextNode <#text> (not painted) BreakNode
(not painted) @@ -60,12 +62,14 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600] PaintableWithLines (BlockContainer) [8,8 10x22] PaintableWithLines (BlockContainer(anonymous)) [13,10 0x18] PaintableWithLines (BlockContainer(anonymous)) [13,10 0x18] - PaintableWithLines (BlockContainer) [13,23 0x0] + PaintableWithLines (BlockContainer) [13,10 0x18] + TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>) PaintableWithLines (BlockContainer) [8,30 10x22] PaintableWithLines (BlockContainer(anonymous)) [13,32 0x18] PaintableWithLines (BlockContainer(anonymous)) [13,32 0x18] - PaintableWithLines (BlockContainer) [13,45 0x0] + PaintableWithLines (BlockContainer) [13,32 0x18] + TextPaintable (TextNode<#text>) TextPaintable (TextNode<#text>) CheckBoxPaintable (CheckBox) [8,52 13x13] TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/expected/empty-editable-shows-cursor.txt b/Tests/LibWeb/Layout/expected/empty-editable-shows-cursor.txt new file mode 100644 index 00000000000..367717b7a6e --- /dev/null +++ b/Tests/LibWeb/Layout/expected/empty-editable-shows-cursor.txt @@ -0,0 +1,88 @@ +Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline + BlockContainer at [0,0] [0+0+0 800 0+0+0] [0+0+0 50 0+0+0] [BFC] children: not-inline + BlockContainer <(anonymous)> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] children: inline + TextNode <#text> (not painted) + BlockContainer at [8,8] [8+0+0 784 0+0+8] [8+0+0 34 0+0+8] children: not-inline + BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline + TextNode <#text> (not painted) + BlockContainer
at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline + BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 34 0+0+0] children: inline + frag 0 from BlockContainer start: 0, length: 0, rect: [9,9 200x20] baseline: 14.796875 + frag 1 from TextNode start: 0, length: 1, rect: [210,9 8x18] baseline: 13.796875 + " " + frag 2 from BlockContainer start: 0, length: 0, rect: [221,11 160x28] baseline: 14.390625 + frag 3 from TextNode start: 0, length: 1, rect: [384,9 8x18] baseline: 13.796875 + " " + frag 4 from BlockContainer start: 0, length: 0, rect: [393,9 200x20] baseline: 14.796875 + frag 5 from TextNode start: 0, length: 1, rect: [594,9 8x18] baseline: 13.796875 + " " + frag 6 from BlockContainer start: 0, length: 0, rect: [605,11 160x28] baseline: 14.390625 + TextNode <#text> (not painted) + BlockContainer at [9,9] inline-block [0+1+0 200 0+1+0] [0+1+0 20 0+1+0] [BFC] children: not-inline + Box
at [11,10] flex-container(row) [0+0+2 196 2+0+0] [0+0+1 18 1+0+0] [FFC] children: not-inline + BlockContainer
at [11,10] flex-item [0+0+0 0 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + frag 0 from TextNode start: 0, length: 0, rect: [11,10 0x18] baseline: 13.796875 + TextNode <#text> (not painted) + BlockContainer <(anonymous)> at [11,10] flex-item [0+0+0 36.84375 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline + InlineNode
at [11,10] [0+0+0 36.84375 0+0+0] [0+0+0 18 0+0+0] + frag 0 from TextNode start: 0, length: 5, rect: [11,10 36.84375x18] baseline: 13.796875 + "hello" + TextNode <#text> (not painted) + TextNode <#text> (not painted) + BlockContainer + + + diff --git a/Tests/LibWeb/Ref/expected/css-read-only-read-write-selectors-ref.html b/Tests/LibWeb/Ref/expected/css-read-only-read-write-selectors-ref.html index 59e7af2a3d3..f441d334596 100644 --- a/Tests/LibWeb/Ref/expected/css-read-only-read-write-selectors-ref.html +++ b/Tests/LibWeb/Ref/expected/css-read-only-read-write-selectors-ref.html @@ -7,8 +7,8 @@ border: 4px solid magenta; } - - + +

Well hello friends

Well hello friends

diff --git a/Tests/LibWeb/Ref/input/css-read-only-read-write-selectors.html b/Tests/LibWeb/Ref/input/css-read-only-read-write-selectors.html index a0e09828939..dfdbdbfbf13 100644 --- a/Tests/LibWeb/Ref/input/css-read-only-read-write-selectors.html +++ b/Tests/LibWeb/Ref/input/css-read-only-read-write-selectors.html @@ -8,8 +8,8 @@ border: 4px solid magenta; } - - + +

Well hello friends

Well hello friends