mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
LibWeb: Port Layout::TextNode from DeprecatedString
This commit is contained in:
parent
6b32a1f18f
commit
56d10bf198
9 changed files with 37 additions and 35 deletions
|
@ -234,13 +234,13 @@ ErrorOr<void> TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element
|
|||
|
||||
static bool is_ignorable_whitespace(Layout::Node const& node)
|
||||
{
|
||||
if (node.is_text_node() && static_cast<TextNode const&>(node).text_for_rendering().is_whitespace())
|
||||
if (node.is_text_node() && static_cast<TextNode const&>(node).text_for_rendering().bytes_as_string_view().is_whitespace())
|
||||
return true;
|
||||
|
||||
if (node.is_anonymous() && node.is_block_container() && static_cast<BlockContainer const&>(node).children_are_inline()) {
|
||||
bool contains_only_white_space = true;
|
||||
node.for_each_in_inclusive_subtree_of_type<TextNode>([&contains_only_white_space](auto& text_node) {
|
||||
if (!text_node.text_for_rendering().is_whitespace()) {
|
||||
if (!text_node.text_for_rendering().bytes_as_string_view().is_whitespace()) {
|
||||
contains_only_white_space = false;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue