mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19: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
|
@ -24,11 +24,21 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/DOM/Position.h>
|
||||
#include <LibWeb/Layout/LayoutPosition.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
DOM::Position LayoutPosition::to_dom_position() const
|
||||
{
|
||||
if (!layout_node)
|
||||
return {};
|
||||
|
||||
// FIXME: Verify that there are no shenanigans going on.
|
||||
return { const_cast<DOM::Node&>(*layout_node->dom_node()), (unsigned)index_in_node };
|
||||
}
|
||||
|
||||
LayoutRange LayoutRange::normalized() const
|
||||
{
|
||||
if (!is_valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue