mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibWeb: Fix many bugs with the editing.
This commit is contained in:
parent
78558c9f30
commit
b3d7c5bfbc
2 changed files with 4 additions and 9 deletions
|
@ -40,11 +40,6 @@ namespace Web {
|
|||
|
||||
void EditEventHandler::handle_delete(DOM::Range range)
|
||||
{
|
||||
// FIXME: Deleting nodes seems to mess up the layout tree. Not sure if this is not entirely
|
||||
// my fault or not my fault at all.
|
||||
|
||||
dump_tree(*m_frame.document());
|
||||
|
||||
if (range.start().node() != range.end().node()) {
|
||||
if (range.start().node()->parent() == range.end().node()->parent()) {
|
||||
// Remove all intermediate nodes.
|
||||
|
@ -85,8 +80,6 @@ void EditEventHandler::handle_delete(DOM::Range range)
|
|||
// FIXME: We need to remove stale layout nodes when nodes are removed from the DOM. Currently,
|
||||
// this is the only way to get these to disappear.
|
||||
m_frame.document()->force_layout();
|
||||
|
||||
dump_tree(*m_frame.document());
|
||||
}
|
||||
|
||||
void EditEventHandler::handle_insert(DOM::Position position, u32 code_point)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue