Skip to content

Commit cc43dbf

Browse files
shannonboothawesomekling
authored andcommitted
LibWeb: Port HTMLTextAreaElement from DeprecatedString
1 parent a7b8828 commit cc43dbf

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ namespace Web::HTML {
2020

2121
HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
2222
: HTMLElement(document, move(qualified_name))
23-
, m_raw_value(DeprecatedString::empty())
2423
{
2524
}
2625

@@ -111,7 +110,7 @@ void HTMLTextAreaElement::create_shadow_tree_if_needed()
111110
m_text_node->set_editable_text_node_owner(Badge<HTMLTextAreaElement> {}, *this);
112111
// NOTE: If `children_changed()` was called before now, `m_raw_value` will hold the text content.
113112
// Otherwise, it will get filled in whenever that does get called.
114-
m_text_node->set_text_content(MUST(String::from_deprecated_string(m_raw_value)));
113+
m_text_node->set_text_content(m_raw_value);
115114

116115
MUST(m_inner_text_element->append_child(*m_text_node));
117116
MUST(element->append_child(*m_inner_text_element));
@@ -127,7 +126,7 @@ void HTMLTextAreaElement::children_changed()
127126
if (!m_dirty) {
128127
m_raw_value = child_text_content();
129128
if (m_text_node)
130-
m_text_node->set_text_content(MUST(String::from_deprecated_string(m_raw_value)));
129+
m_text_node->set_text_content(m_raw_value);
131130
}
132131
}
133132

Userland/Libraries/LibWeb/HTML/HTMLTextAreaElement.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class HTMLTextAreaElement final
2727

2828
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
2929

30-
DeprecatedString const& type() const
30+
String const& type() const
3131
{
32-
static DeprecatedString textarea = "textarea";
32+
static String const textarea = "textarea"_string;
3333
return textarea;
3434
}
3535

@@ -84,7 +84,7 @@ class HTMLTextAreaElement final
8484
JS::GCPtr<DOM::Text> m_text_node;
8585

8686
bool m_dirty { false };
87-
DeprecatedString m_raw_value;
87+
String m_raw_value;
8888
};
8989

9090
}

0 commit comments

Comments
 (0)