LibWeb: Implement "preserves overrides" property of editing commands

This commit is contained in:
Jelle Raaijmakers 2024-12-22 21:34:50 +01:00 committed by Andreas Kling
commit 2b6a14c5ee
Notes: github-actions[bot] 2025-01-10 22:38:22 +00:00
9 changed files with 315 additions and 80 deletions

View file

@ -791,6 +791,7 @@ static Array const commands {
CommandDefinition {
.command = CommandNames::delete_,
.action = command_delete_action,
.preserves_overrides = true,
},
// https://w3c.github.io/editing/docs/execCommand/#the-defaultparagraphseparator-command
CommandDefinition {
@ -802,11 +803,13 @@ static Array const commands {
CommandDefinition {
.command = CommandNames::insertLineBreak,
.action = command_insert_linebreak_action,
.preserves_overrides = true,
},
// https://w3c.github.io/editing/docs/execCommand/#the-insertparagraph-command
CommandDefinition {
.command = CommandNames::insertParagraph,
.action = command_insert_paragraph_action,
.preserves_overrides = true,
},
// https://w3c.github.io/editing/docs/execCommand/#the-stylewithcss-command
CommandDefinition {