From bbcc5a93321fa34b537e5b635040357c4d49f5d6 Mon Sep 17 00:00:00 2001 From: asynts Date: Tue, 1 Dec 2020 23:35:47 +0100 Subject: [PATCH] LibWeb: Move editing stuff into EditEventHandler. --- Base/res/html/misc/contenteditable.html | 8 +++ Base/res/html/misc/welcome.html | 1 + Libraries/LibWeb/CMakeLists.txt | 1 + Libraries/LibWeb/DOM/Position.h | 2 + Libraries/LibWeb/Forward.h | 1 + Libraries/LibWeb/Layout/LayoutPosition.cpp | 10 +++ Libraries/LibWeb/Layout/LayoutPosition.h | 6 ++ Libraries/LibWeb/Page/EditEventHandler.cpp | 71 ++++++++++++++++++++++ Libraries/LibWeb/Page/EditEventHandler.h | 49 +++++++++++++++ Libraries/LibWeb/Page/EventHandler.cpp | 29 +++------ Libraries/LibWeb/Page/EventHandler.h | 5 ++ 11 files changed, 161 insertions(+), 22 deletions(-) create mode 100644 Base/res/html/misc/contenteditable.html create mode 100644 Libraries/LibWeb/Page/EditEventHandler.cpp create mode 100644 Libraries/LibWeb/Page/EditEventHandler.h diff --git a/Base/res/html/misc/contenteditable.html b/Base/res/html/misc/contenteditable.html new file mode 100644 index 0000000000..6bc6239f37 --- /dev/null +++ b/Base/res/html/misc/contenteditable.html @@ -0,0 +1,8 @@ + + +

Everything on this page should be editable.

+ +

Here is a paragraph to play with.

+

Another paragraph with a bold element embeded in it.

+ + diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index c976d522d5..51bbae1346 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -38,6 +38,7 @@ span#loadtime {

This page loaded in ms

Some small test pages: