1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 20:22:13 +00:00

LibWeb: Port Node interface from DeprecatedString to String

Which is fortunately quite straight forward :^)
This commit is contained in:
Shannon Booth 2023-09-17 10:51:43 +12:00 committed by Andreas Kling
parent a76ef04ae6
commit 8ce9e51c97
21 changed files with 50 additions and 45 deletions

View file

@ -137,7 +137,7 @@ String HTMLElement::inner_text()
// innerText for element being rendered takes visibility into account, so force a layout and then walk the layout tree.
document().update_layout();
if (!layout_node())
return MUST(String::from_deprecated_string(text_content()));
return text_content().value_or(String {});
Function<void(Layout::Node const&)> recurse = [&](auto& node) {
for (auto* child = node.first_child(); child; child = child->next_sibling()) {