mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
LibWeb: Remove duplicate code from ViewportPaintable
No functional changes.
This commit is contained in:
parent
730ec6aff9
commit
69bbeea4ef
Notes:
github-actions[bot]
2024-08-27 11:13:08 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/69bbeea4ef3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1193 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 1 additions and 9 deletions
|
@ -224,20 +224,12 @@ void ViewportPaintable::recompute_selection_states()
|
|||
|
||||
// 2. If it's a text node, mark it as StartAndEnd and return.
|
||||
if (is<DOM::Text>(*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<DOM::Text>(*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<DOM::Text>(*start_container))
|
||||
|
|
Loading…
Reference in a new issue