mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-22 02:01:55 +00:00
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:
parent
1c0541d706
commit
2b6c00e8b9
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/trflynn89
Commit: 2b6c00e8b9
Pull-request: https://github.com/SerenityOS/serenity/pull/23586
4 changed files with 36 additions and 6 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue