Jelle Raaijmakers
f88c13a58c
LibWeb: Prevent null deref in collapsed whitespace check
...
The spec even warned us about the reference potentially being null.
2024-12-10 14:54:19 +01:00
Jelle Raaijmakers
9b446df7f5
LibWeb: Replace local name checks with simpler is<T>
in editing API
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
e308a3fd3f
LibWeb: Be more defensive while traversing ancestors in editing API
...
In all these cases there should be an ancestor available, but it
definitely cannot hurt to be a bit more defensive about this and prevent
nullptr dereferences.
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
b6939c8035
LibWeb: Use wrap algorithm in "fix disallowed ancestors"
...
We have the wrap algorithm implemented now, so resolve the FIXME.
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
4f76cec096
LibWeb: Implement document.execCommand("insertParagraph")
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
2e29d3fb57
LibWeb: Fix is_allowed_child_of_node() for non-element parent node
...
When passing a DOM::Node that is not a DOM::Element, this method would
always try to cast to a DOM::Element.
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
98df4c2b3c
LibWeb: Make Editing::fix_disallowed_ancestors_of_node() take a GC::Ref
2024-12-04 06:51:59 +01:00
Jelle Raaijmakers
6a85677f70
LibWeb: Expose HTMLElement's content editable state
2024-12-03 00:18:03 +01:00
Jelle Raaijmakers
217567981a
LibWeb: Implement "plaintext-only" state for contenteditable
2024-12-03 00:18:03 +01:00
Jelle Raaijmakers
7e406ac668
LibWeb: Simplify editing algorithm for "ends in space" condition
...
Checking if a string ends in a space does not require converting UTF-8
to UTF-16 and reading out its code points.
2024-12-03 00:18:03 +01:00
Jelle Raaijmakers
bb618736e9
LibWeb: Use default paragraph separator in delete command
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
7bb865052a
LibWeb: Implement document.execCommand("delete")
...
To facilitate the implementation of "delete" and all associated
algorithms, split off this piece of `Document` into a separate
directory.
This sets up the infrastructure for arbitrary commands to be supported.
2024-11-30 17:35:45 +01:00