1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-06 01:47:34 +00:00

LibWeb: Add a blinking text cursor :^)

Each Web::Frame now has a cursor that sits at a DOM::Position. It will
blink and look like a nice regular text cursor.

It doesn't really do anything yet, but it will eventually.
This commit is contained in:
Andreas Kling 2020-08-02 11:52:35 +02:00
parent e496a74bb3
commit 2c679d0c8b
5 changed files with 66 additions and 0 deletions

View file

@ -150,6 +150,7 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
}
} else {
if (button == GUI::MouseButton::Left) {
m_frame.set_cursor_position(DOM::Position(*node, result.index_in_node));
layout_root()->selection().set({ result.layout_node, result.index_in_node }, {});
dump_selection("MouseDown");
m_in_mouse_selection = true;