mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-19 14:14:41 +00:00
LibWeb: Make selection state recomputation implicit
Add a LayoutDocument API for modifying the selection and make clients call that so we can recompute selection states automatically.
This commit is contained in:
@@ -109,8 +109,7 @@ void InProcessWebView::select_all()
|
||||
if (is<LayoutText>(*last_layout_node))
|
||||
last_layout_node_index_in_node = downcast<LayoutText>(*last_layout_node).text_for_rendering().length() - 1;
|
||||
|
||||
layout_root->selection().set({ first_layout_node, 0 }, { last_layout_node, last_layout_node_index_in_node });
|
||||
layout_root->recompute_selection_states();
|
||||
layout_root->set_selection({ { first_layout_node, 0 }, { last_layout_node, last_layout_node_index_in_node } });
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user