mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01: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
|
|
@ -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…
Reference in New Issue
Block a user