mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +00:00
LibWeb: Port Intrinsics from DeprecatedString
This commit is contained in:
parent
9cd36839d2
commit
96af80acd1
279 changed files with 305 additions and 304 deletions
|
@ -30,7 +30,7 @@ AbortController::~AbortController() = default;
|
|||
void AbortController::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortControllerPrototype>(realm, "AbortController"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortControllerPrototype>(realm, "AbortController"_fly_string));
|
||||
}
|
||||
|
||||
void AbortController::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -27,7 +27,7 @@ AbortSignal::AbortSignal(JS::Realm& realm)
|
|||
void AbortSignal::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortSignalPrototype>(realm, "AbortSignal"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortSignalPrototype>(realm, "AbortSignal"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-add
|
||||
|
|
|
@ -24,7 +24,7 @@ AbstractRange::~AbstractRange() = default;
|
|||
void AbstractRange::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbstractRangePrototype>(realm, "AbstractRange"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbstractRangePrototype>(realm, "AbstractRange"_fly_string));
|
||||
}
|
||||
|
||||
void AbstractRange::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -43,7 +43,7 @@ Attr::Attr(Document& document, QualifiedName qualified_name, String value, Eleme
|
|||
void Attr::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AttrPrototype>(realm, "Attr"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AttrPrototype>(realm, "Attr"_fly_string));
|
||||
}
|
||||
|
||||
void Attr::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -21,7 +21,7 @@ CDATASection::~CDATASection() = default;
|
|||
void CDATASection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CDATASectionPrototype>(realm, "CDATASection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CDATASectionPrototype>(realm, "CDATASection"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ CharacterData::CharacterData(Document& document, NodeType type, String const& da
|
|||
void CharacterData::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CharacterDataPrototype>(realm, "CharacterData"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CharacterDataPrototype>(realm, "CharacterData"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
||||
|
|
|
@ -28,7 +28,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Comment>> Comment::construct_impl(JS::Realm
|
|||
void Comment::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CommentPrototype>(realm, "Comment"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CommentPrototype>(realm, "Comment"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ CustomEvent::~CustomEvent() = default;
|
|||
void CustomEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomEventPrototype>(realm, "CustomEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomEventPrototype>(realm, "CustomEvent"_fly_string));
|
||||
}
|
||||
|
||||
void CustomEvent::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
|
|
@ -36,7 +36,7 @@ DOMImplementation::~DOMImplementation() = default;
|
|||
void DOMImplementation::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMImplementationPrototype>(realm, "DOMImplementation"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMImplementationPrototype>(realm, "DOMImplementation"_fly_string));
|
||||
}
|
||||
|
||||
void DOMImplementation::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -73,7 +73,7 @@ DOMTokenList::DOMTokenList(Element& associated_element, FlyString associated_att
|
|||
void DOMTokenList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMTokenListPrototype>(realm, "DOMTokenList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMTokenListPrototype>(realm, "DOMTokenList"_fly_string));
|
||||
}
|
||||
|
||||
void DOMTokenList::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -344,7 +344,7 @@ Document::~Document()
|
|||
void Document::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentPrototype>(realm, "Document"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentPrototype>(realm, "Document"_fly_string));
|
||||
|
||||
m_selection = heap().allocate<Selection::Selection>(realm, realm, *this);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ DocumentFragment::DocumentFragment(Document& document)
|
|||
void DocumentFragment::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentFragmentPrototype>(realm, "DocumentFragment"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentFragmentPrototype>(realm, "DocumentFragment"_fly_string));
|
||||
}
|
||||
|
||||
void DocumentFragment::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -24,7 +24,7 @@ DocumentType::DocumentType(Document& document)
|
|||
void DocumentType::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTypePrototype>(realm, "DocumentType"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTypePrototype>(realm, "DocumentType"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ Element::~Element() = default;
|
|||
void Element::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ElementPrototype>(realm, "Element"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ElementPrototype>(realm, "Element"_fly_string));
|
||||
|
||||
m_attributes = NamedNodeMap::create(*this);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ Event::Event(JS::Realm& realm, FlyString const& type, EventInit const& event_ini
|
|||
void Event::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventPrototype>(realm, "Event"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventPrototype>(realm, "Event"_fly_string));
|
||||
}
|
||||
|
||||
void Event::visit_edges(Visitor& visitor)
|
||||
|
|
|
@ -59,7 +59,7 @@ void EventTarget::initialize(JS::Realm& realm)
|
|||
// FIXME: We can't do this for HTML::Window or HTML::WorkerGlobalScope, as this will run when creating the initial global object.
|
||||
// During this time, the ESO is not setup, so it will cause a nullptr dereference in host_defined_intrinsics.
|
||||
if (!is<HTML::WindowOrWorkerGlobalScopeMixin>(this))
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventTargetPrototype>(realm, "EventTarget"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventTargetPrototype>(realm, "EventTarget"_fly_string));
|
||||
}
|
||||
|
||||
void EventTarget::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -33,7 +33,7 @@ HTMLCollection::~HTMLCollection() = default;
|
|||
void HTMLCollection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLCollectionPrototype>(realm, "HTMLCollection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLCollectionPrototype>(realm, "HTMLCollection"_fly_string));
|
||||
}
|
||||
|
||||
void HTMLCollection::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -29,7 +29,7 @@ HTMLFormControlsCollection::~HTMLFormControlsCollection() = default;
|
|||
void HTMLFormControlsCollection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLFormControlsCollectionPrototype>(realm, "HTMLFormControlsCollection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLFormControlsCollectionPrototype>(realm, "HTMLFormControlsCollection"_fly_string));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlformcontrolscollection-nameditem
|
||||
|
|
|
@ -42,7 +42,7 @@ MutationObserver::~MutationObserver()
|
|||
void MutationObserver::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationObserverPrototype>(realm, "MutationObserver"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationObserverPrototype>(realm, "MutationObserver"_fly_string));
|
||||
}
|
||||
|
||||
void MutationObserver::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -38,7 +38,7 @@ MutationRecord::~MutationRecord() = default;
|
|||
void MutationRecord::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationRecordPrototype>(realm, "MutationRecord"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationRecordPrototype>(realm, "MutationRecord"_fly_string));
|
||||
}
|
||||
|
||||
void MutationRecord::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -31,7 +31,7 @@ NamedNodeMap::NamedNodeMap(Element& element)
|
|||
void NamedNodeMap::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NamedNodeMapPrototype>(realm, "NamedNodeMap"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NamedNodeMapPrototype>(realm, "NamedNodeMap"_fly_string));
|
||||
}
|
||||
|
||||
void NamedNodeMap::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -26,7 +26,7 @@ NodeIterator::~NodeIterator() = default;
|
|||
void NodeIterator::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeIteratorPrototype>(realm, "NodeIterator"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeIteratorPrototype>(realm, "NodeIterator"_fly_string));
|
||||
}
|
||||
|
||||
void NodeIterator::finalize()
|
||||
|
|
|
@ -20,7 +20,7 @@ NodeList::~NodeList() = default;
|
|||
void NodeList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeListPrototype>(realm, "NodeList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeListPrototype>(realm, "NodeList"_fly_string));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::Value> NodeList::item_value(size_t index) const
|
||||
|
|
|
@ -22,7 +22,7 @@ ProcessingInstruction::ProcessingInstruction(Document& document, DeprecatedStrin
|
|||
void ProcessingInstruction::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ProcessingInstructionPrototype>(realm, "ProcessingInstruction"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ProcessingInstructionPrototype>(realm, "ProcessingInstruction"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ RadioNodeList::~RadioNodeList() = default;
|
|||
void RadioNodeList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RadioNodeListPrototype>(realm, "RadioNodeList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RadioNodeListPrototype>(realm, "RadioNodeList"_fly_string));
|
||||
}
|
||||
|
||||
static HTML::HTMLInputElement const* radio_button(Node const& node)
|
||||
|
|
|
@ -75,7 +75,7 @@ Range::~Range()
|
|||
void Range::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RangePrototype>(realm, "Range"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RangePrototype>(realm, "Range"_fly_string));
|
||||
}
|
||||
|
||||
void Range::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -24,7 +24,7 @@ ShadowRoot::ShadowRoot(Document& document, Element& host, Bindings::ShadowRootMo
|
|||
void ShadowRoot::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ShadowRootPrototype>(realm, "ShadowRoot"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ShadowRootPrototype>(realm, "ShadowRoot"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6
|
||||
|
|
|
@ -40,7 +40,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<StaticRange>> StaticRange::construct_impl(J
|
|||
void StaticRange::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StaticRangePrototype>(realm, "StaticRange"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StaticRangePrototype>(realm, "StaticRange"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ Text::Text(Document& document, NodeType type, String const& data)
|
|||
void Text::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextPrototype>(realm, "Text"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextPrototype>(realm, "Text"_fly_string));
|
||||
}
|
||||
|
||||
void Text::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -27,7 +27,7 @@ TreeWalker::~TreeWalker() = default;
|
|||
void TreeWalker::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TreeWalkerPrototype>(realm, "TreeWalker"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TreeWalkerPrototype>(realm, "TreeWalker"_fly_string));
|
||||
}
|
||||
|
||||
void TreeWalker::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -24,7 +24,7 @@ XMLDocument::XMLDocument(JS::Realm& realm, AK::URL const& url)
|
|||
void XMLDocument::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLDocumentPrototype>(realm, "XMLDocument"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLDocumentPrototype>(realm, "XMLDocument"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue