mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:14:58 +00:00
LibWeb: Port HTMLTextAreaElement from DeprecatedString
This commit is contained in:
parent
a7b8828db2
commit
cc43dbf56e
2 changed files with 5 additions and 6 deletions
|
@ -20,7 +20,6 @@ namespace Web::HTML {
|
|||
|
||||
HTMLTextAreaElement::HTMLTextAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
, m_raw_value(DeprecatedString::empty())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -111,7 +110,7 @@ void HTMLTextAreaElement::create_shadow_tree_if_needed()
|
|||
m_text_node->set_editable_text_node_owner(Badge<HTMLTextAreaElement> {}, *this);
|
||||
// NOTE: If `children_changed()` was called before now, `m_raw_value` will hold the text content.
|
||||
// Otherwise, it will get filled in whenever that does get called.
|
||||
m_text_node->set_text_content(MUST(String::from_deprecated_string(m_raw_value)));
|
||||
m_text_node->set_text_content(m_raw_value);
|
||||
|
||||
MUST(m_inner_text_element->append_child(*m_text_node));
|
||||
MUST(element->append_child(*m_inner_text_element));
|
||||
|
@ -127,7 +126,7 @@ void HTMLTextAreaElement::children_changed()
|
|||
if (!m_dirty) {
|
||||
m_raw_value = child_text_content();
|
||||
if (m_text_node)
|
||||
m_text_node->set_text_content(MUST(String::from_deprecated_string(m_raw_value)));
|
||||
m_text_node->set_text_content(m_raw_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue