mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Update two stray "take the action for command" invocations
This is the more idiomatic (although functionally equivalent) way of taking the action for any command.
This commit is contained in:
parent
e2f8f5a350
commit
fd066d2b58
Notes:
github-actions[bot]
2025-07-24 11:20:19 +00:00
Author: https://github.com/gmta
Commit: fd066d2b58
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5574
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 2 additions and 2 deletions
|
@ -1744,7 +1744,7 @@ bool command_insert_text_action(DOM::Document& document, String const& value)
|
|||
if (value.code_points().length() > 1) {
|
||||
// 1. For each code unit el in value, take the action for the insertText command, with value equal to el.
|
||||
for (auto el : value.code_points())
|
||||
command_insert_text_action(document, String::from_code_point(el));
|
||||
take_the_action_for_command(document, CommandNames::insertText, String::from_code_point(el));
|
||||
|
||||
// 2. Return true.
|
||||
return true;
|
||||
|
@ -1756,7 +1756,7 @@ bool command_insert_text_action(DOM::Document& document, String const& value)
|
|||
|
||||
// 5. If value is a newline (U+000A), take the action for the insertParagraph command and return true.
|
||||
if (value == "\n"sv) {
|
||||
command_insert_paragraph_action(document, {});
|
||||
take_the_action_for_command(document, CommandNames::insertParagraph, {});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue