LibWeb: Do not override whitespace handling for editable elements

This condition no longer seems to be necessary for anything, and it
caused newlines to not render correctly in editable nodes.
This commit is contained in:
Jelle Raaijmakers 2025-05-16 10:37:01 +02:00 committed by Sam Atkins
parent a48e693ea1
commit 29f1648bc5
Notes: github-actions[bot] 2025-05-16 11:10:43 +00:00
5 changed files with 20 additions and 6 deletions

View file

@ -339,9 +339,6 @@ void TextNode::compute_text_for_rendering()
VERIFY_NOT_REACHED();
}(computed_values().white_space());
if (dom_node().is_editable() && !dom_node().is_uninteresting_whitespace_node())
collapse = false;
auto parent_element = dom_node().parent_element();
auto const maybe_lang = parent_element ? parent_element->lang() : Optional<String> {};
auto const lang = maybe_lang.has_value() ? maybe_lang.value() : Optional<StringView> {};