mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-11 13:42:52 +00:00
LibWeb: Make Editing::fix_disallowed_ancestors_of_node() take a GC::Ref
This commit is contained in:
parent
211dc5659c
commit
98df4c2b3c
Notes:
github-actions[bot]
2024-12-04 05:53:28 +00:00
Author: https://github.com/gmta
Commit: 98df4c2b3c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2735
Reviewed-by: https://github.com/tcl3
3 changed files with 3 additions and 3 deletions
Libraries/LibWeb/Editing
|
@ -206,7 +206,7 @@ bool command_delete_action(DOM::Document& document, String const&)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7. Fix disallowed ancestors of node.
|
// 7. Fix disallowed ancestors of node.
|
||||||
fix_disallowed_ancestors_of_node(node);
|
fix_disallowed_ancestors_of_node(*node);
|
||||||
|
|
||||||
// 8. Return true.
|
// 8. Return true.
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -374,7 +374,7 @@ GC::Ptr<DOM::Node> editing_host_of_node(GC::Ref<DOM::Node> node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/editing/docs/execCommand/#fix-disallowed-ancestors
|
// https://w3c.github.io/editing/docs/execCommand/#fix-disallowed-ancestors
|
||||||
void fix_disallowed_ancestors_of_node(GC::Ptr<DOM::Node> node)
|
void fix_disallowed_ancestors_of_node(GC::Ref<DOM::Node> node)
|
||||||
{
|
{
|
||||||
// 1. If node is not editable, abort these steps.
|
// 1. If node is not editable, abort these steps.
|
||||||
if (!node->is_editable())
|
if (!node->is_editable())
|
||||||
|
|
|
@ -25,7 +25,7 @@ String canonical_space_sequence(u32 length, bool non_breaking_start, bool non_br
|
||||||
void canonicalize_whitespace(GC::Ref<DOM::Node>, u32 offset, bool fix_collapsed_space = true);
|
void canonicalize_whitespace(GC::Ref<DOM::Node>, u32 offset, bool fix_collapsed_space = true);
|
||||||
void delete_the_selection(Selection::Selection const&);
|
void delete_the_selection(Selection::Selection const&);
|
||||||
GC::Ptr<DOM::Node> editing_host_of_node(GC::Ref<DOM::Node>);
|
GC::Ptr<DOM::Node> editing_host_of_node(GC::Ref<DOM::Node>);
|
||||||
void fix_disallowed_ancestors_of_node(GC::Ptr<DOM::Node>);
|
void fix_disallowed_ancestors_of_node(GC::Ref<DOM::Node>);
|
||||||
bool follows_a_line_break(GC::Ref<DOM::Node>);
|
bool follows_a_line_break(GC::Ref<DOM::Node>);
|
||||||
bool is_allowed_child_of_node(Variant<GC::Ref<DOM::Node>, FlyString> child, Variant<GC::Ref<DOM::Node>, FlyString> parent);
|
bool is_allowed_child_of_node(Variant<GC::Ref<DOM::Node>, FlyString> child, Variant<GC::Ref<DOM::Node>, FlyString> parent);
|
||||||
bool is_block_boundary_point(GC::Ref<DOM::Node>, u32 offset);
|
bool is_block_boundary_point(GC::Ref<DOM::Node>, u32 offset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue