mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 23:59:53 +00:00
LibWeb: Port the FormAssociatedElement value to UTF-16
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This porting effort makes it pretty clear we will want a UTF-16-aware GenericLexer. But for now, we can actually make ASCII assumptions about what we are parsing, and act accordingly.
This commit is contained in:
parent
e7b08cf291
commit
c8888609f4
Notes:
github-actions[bot]
2025-07-28 10:26:29 +00:00
Author: https://github.com/trflynn89
Commit: c8888609f4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5610
30 changed files with 444 additions and 333 deletions
|
@ -80,14 +80,14 @@ public:
|
|||
String default_value() const;
|
||||
void set_default_value(String const&);
|
||||
|
||||
String value() const override;
|
||||
void set_value(String const&);
|
||||
Utf16String value() const override;
|
||||
void set_value(Utf16String const&);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element:concept-fe-api-value-3
|
||||
String api_value() const;
|
||||
Utf16String api_value() const;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-textarea/input-relevant-value
|
||||
virtual Utf16String relevant_value() override { return Utf16String::from_utf8(api_value()); }
|
||||
virtual Utf16String relevant_value() override { return api_value(); }
|
||||
virtual WebIDL::ExceptionOr<void> set_relevant_value(Utf16String const& value) override;
|
||||
|
||||
virtual void set_dirty_value_flag(bool flag) override { m_dirty_value = flag; }
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void set_raw_value(String);
|
||||
void set_raw_value(Utf16String);
|
||||
|
||||
// ^DOM::Element
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
|
@ -169,10 +169,10 @@ private:
|
|||
bool m_user_validity { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-textarea-raw-value
|
||||
String m_raw_value;
|
||||
Utf16String m_raw_value;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-api-value
|
||||
mutable Optional<String> m_api_value;
|
||||
mutable Optional<Utf16String> m_api_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue