From b787978702b5cf22a94135bd7244fd3a33f326dd Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 16 Jun 2026 10:23:57 +0200 Subject: [PATCH] LibWeb/Editing: Move ToggleListMode enum inside function scope It's not used anywhere else. --- Libraries/LibWeb/Editing/Internal/Algorithms.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp index 1b8dcea3c8..57622cde77 100644 --- a/Libraries/LibWeb/Editing/Internal/Algorithms.cpp +++ b/Libraries/LibWeb/Editing/Internal/Algorithms.cpp @@ -4040,17 +4040,16 @@ void split_the_parent_of_nodes(Vector> const& node_list) remove_extraneous_line_breaks_at_the_end_of_node(*last_node->parent()); } -enum class ToggleListMode : u8 { - Enable, - Disable, -}; - // https://w3c.github.io/editing/docs/execCommand/#toggle-lists void toggle_lists(DOM::Document& document, FlyString const& tag_name) { VERIFY(first_is_one_of(tag_name, HTML::TagNames::ol, HTML::TagNames::ul)); // 1. Let mode be "disable" if the selection's list state is tag name, and "enable" otherwise. + enum class ToggleListMode : u8 { + Enable, + Disable, + }; auto mode = ToggleListMode::Enable; auto list_state = selections_list_state(document); if ((list_state == SelectionsListState::Ol && tag_name == HTML::TagNames::ol)