LibWeb: Use the <textarea>'s API value, not its raw value, where needed

The API value of a <textarea> element is its raw value with normalized
newlines. This should be used in a couple of places where we currently
use the raw value.
This commit is contained in:
Timothy Flynn 2024-03-14 07:26:26 -04:00 committed by Andreas Kling
parent 1c0541d706
commit 2b6c00e8b9
Notes: sideshowbarker 2024-07-17 07:43:05 +09:00
4 changed files with 36 additions and 6 deletions

View file

@ -102,6 +102,9 @@ private:
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
void set_raw_value(String);
String api_value() const;
// ^DOM::Element
virtual i32 default_tab_index_value() const override;
@ -129,6 +132,9 @@ private:
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-textarea-raw-value
String m_raw_value;
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-api-value
mutable Optional<String> m_api_value;
};
}