1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

LibWeb: Allow inserting text at the cursor by typing characters :^)

This works everywhere right now, but it's obviously not going to stay
that way forever. :^)

Note that this does not advance the cursor correctly for whitespace
since the cursor is DOM-based and doesn't take whitespace collapsing
into account yet.
This commit is contained in:
Andreas Kling 2020-08-02 12:10:01 +02:00
parent 2c679d0c8b
commit bc299754f6
7 changed files with 35 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include <AK/Forward.h>
#include <Kernel/API/KeyCode.h>
#include <LibGUI/Forward.h>
#include <LibGfx/Forward.h>
#include <LibWeb/Forward.h>
@ -44,6 +45,8 @@ public:
bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
private:
LayoutDocument* layout_root();
const LayoutDocument* layout_root() const;