mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
LibWeb: Move editing stuff into EditEventHandler.
This commit is contained in:
parent
82aac98bea
commit
bbcc5a9332
11 changed files with 161 additions and 22 deletions
|
@ -27,6 +27,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
@ -35,6 +37,8 @@ class Node;
|
|||
struct LayoutPosition {
|
||||
RefPtr<Node> layout_node;
|
||||
int index_in_node { 0 };
|
||||
|
||||
DOM::Position to_dom_position() const;
|
||||
};
|
||||
|
||||
class LayoutRange {
|
||||
|
@ -58,7 +62,9 @@ public:
|
|||
void set_end(const LayoutPosition& end) { m_end = end; }
|
||||
|
||||
const LayoutPosition& start() const { return m_start; }
|
||||
LayoutPosition& start() { return m_start; }
|
||||
const LayoutPosition& end() const { return m_end; }
|
||||
LayoutPosition& end() { return m_end; }
|
||||
|
||||
LayoutRange normalized() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue