|
@@ -35,8 +35,7 @@ void Text::visit_edges(Cell::Visitor& visitor)
|
|
{
|
|
{
|
|
Base::visit_edges(visitor);
|
|
Base::visit_edges(visitor);
|
|
SlottableMixin::visit_edges(visitor);
|
|
SlottableMixin::visit_edges(visitor);
|
|
-
|
|
|
|
- visitor.visit(dynamic_cast<JS::Cell*>(m_owner.ptr()));
|
|
|
|
|
|
+ visitor.visit(m_owner);
|
|
}
|
|
}
|
|
|
|
|
|
// https://dom.spec.whatwg.org/#dom-text-text
|
|
// https://dom.spec.whatwg.org/#dom-text-text
|
|
@@ -47,6 +46,15 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> Text::construct_impl(JS::Realm& real
|
|
return realm.heap().allocate<Text>(realm, window.associated_document(), data);
|
|
return realm.heap().allocate<Text>(realm, window.associated_document(), data);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+EditableTextNodeOwner* Text::editable_text_node_owner()
|
|
|
|
+{
|
|
|
|
+ if (!m_owner)
|
|
|
|
+ return nullptr;
|
|
|
|
+ EditableTextNodeOwner* owner = dynamic_cast<EditableTextNodeOwner*>(m_owner.ptr());
|
|
|
|
+ VERIFY(owner);
|
|
|
|
+ return owner;
|
|
|
|
+}
|
|
|
|
+
|
|
// https://dom.spec.whatwg.org/#dom-text-splittext
|
|
// https://dom.spec.whatwg.org/#dom-text-splittext
|
|
// https://dom.spec.whatwg.org/#concept-text-split
|
|
// https://dom.spec.whatwg.org/#concept-text-split
|
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> Text::split_text(size_t offset)
|
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<Text>> Text::split_text(size_t offset)
|