From 69bbeea4ef3308487145a85c68eb5413fa4ce287 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Thu, 22 Aug 2024 15:21:43 +0200 Subject: [PATCH] LibWeb: Remove duplicate code from ViewportPaintable No functional changes. --- .../Libraries/LibWeb/Painting/ViewportPaintable.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp index b6752156d4c..ed1b4b1ed19 100644 --- a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp @@ -224,20 +224,12 @@ void ViewportPaintable::recompute_selection_states() // 2. If it's a text node, mark it as StartAndEnd and return. if (is(*start_container)) { - if (auto* paintable = start_container->paintable()) { + if (auto* paintable = start_container->paintable()) paintable->set_selection_state(SelectionState::StartAndEnd); - } return; } } - if (start_container == end_container && is(*start_container)) { - if (auto* paintable = start_container->paintable()) { - paintable->set_selection_state(SelectionState::StartAndEnd); - } - return; - } - // 4. Mark the selection start node as Start (if text) or Full (if anything else). if (auto* paintable = start_container->paintable()) { if (is(*start_container))