1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

LibWeb: Port Intrinsics from DeprecatedString

This commit is contained in:
Shannon Booth 2023-11-22 12:55:21 +13:00 committed by Tim Flynn
parent 9cd36839d2
commit 96af80acd1
279 changed files with 305 additions and 304 deletions

View file

@ -30,7 +30,7 @@ SVGAnimatedLength::~SVGAnimatedLength() = default;
void SVGAnimatedLength::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGAnimatedLengthPrototype>(realm, "SVGAnimatedLength"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGAnimatedLengthPrototype>(realm, "SVGAnimatedLength"_fly_string));
}
void SVGAnimatedLength::visit_edges(Cell::Visitor& visitor)

View file

@ -28,7 +28,7 @@ SVGAnimatedNumber::~SVGAnimatedNumber() = default;
void SVGAnimatedNumber::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGAnimatedNumberPrototype>(realm, "SVGAnimatedNumber"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGAnimatedNumberPrototype>(realm, "SVGAnimatedNumber"_fly_string));
}
}

View file

@ -21,7 +21,7 @@ SVGCircleElement::SVGCircleElement(DOM::Document& document, DOM::QualifiedName q
void SVGCircleElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGCircleElementPrototype>(realm, "SVGCircleElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGCircleElementPrototype>(realm, "SVGCircleElement"_fly_string));
}
void SVGCircleElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -23,7 +23,7 @@ SVGClipPathElement::~SVGClipPathElement()
void SVGClipPathElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGClipPathElementPrototype>(realm, "SVGClipPathElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGClipPathElementPrototype>(realm, "SVGClipPathElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGClipPathElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties>)

View file

@ -24,7 +24,7 @@ SVGDefsElement::~SVGDefsElement()
void SVGDefsElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGDefsElementPrototype>(realm, "SVGDefsElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGDefsElementPrototype>(realm, "SVGDefsElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGDefsElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -23,7 +23,7 @@ SVGElement::SVGElement(DOM::Document& document, DOM::QualifiedName qualified_nam
void SVGElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGElementPrototype>(realm, "SVGElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGElementPrototype>(realm, "SVGElement"_fly_string));
m_dataset = HTML::DOMStringMap::create(*this);
}

View file

@ -21,7 +21,7 @@ SVGEllipseElement::SVGEllipseElement(DOM::Document& document, DOM::QualifiedName
void SVGEllipseElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGEllipseElementPrototype>(realm, "SVGEllipseElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGEllipseElementPrototype>(realm, "SVGEllipseElement"_fly_string));
}
void SVGEllipseElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -27,7 +27,7 @@ SVGForeignObjectElement::~SVGForeignObjectElement() = default;
void SVGForeignObjectElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGForeignObjectElementPrototype>(realm, "SVGForeignObjectElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGForeignObjectElementPrototype>(realm, "SVGForeignObjectElement"_fly_string));
// FIXME: These never actually get updated!
m_x = SVGAnimatedLength::create(realm, SVGLength::create(realm, 0, 0), SVGLength::create(realm, 0, 0));

View file

@ -18,7 +18,7 @@ SVGGeometryElement::SVGGeometryElement(DOM::Document& document, DOM::QualifiedNa
void SVGGeometryElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGeometryElementPrototype>(realm, "SVGGeometryElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGeometryElementPrototype>(realm, "SVGGeometryElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -113,7 +113,7 @@ JS::GCPtr<SVGGradientElement const> SVGGradientElement::linked_gradient() const
void SVGGradientElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGradientElementPrototype>(realm, "SVGGradientElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGradientElementPrototype>(realm, "SVGGradientElement"_fly_string));
}
}

View file

@ -29,7 +29,7 @@ SVGGraphicsElement::SVGGraphicsElement(DOM::Document& document, DOM::QualifiedNa
void SVGGraphicsElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGraphicsElementPrototype>(realm, "SVGGraphicsElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGraphicsElementPrototype>(realm, "SVGGraphicsElement"_fly_string));
}
void SVGGraphicsElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -26,7 +26,7 @@ SVGLength::SVGLength(JS::Realm& realm, u8 unit_type, float value)
void SVGLength::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLengthPrototype>(realm, "SVGLength"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLengthPrototype>(realm, "SVGLength"_fly_string));
}
SVGLength::~SVGLength() = default;

View file

@ -21,7 +21,7 @@ SVGLineElement::SVGLineElement(DOM::Document& document, DOM::QualifiedName quali
void SVGLineElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLineElementPrototype>(realm, "SVGLineElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLineElementPrototype>(realm, "SVGLineElement"_fly_string));
}
void SVGLineElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -23,7 +23,7 @@ SVGLinearGradientElement::SVGLinearGradientElement(DOM::Document& document, DOM:
void SVGLinearGradientElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLinearGradientElementPrototype>(realm, "SVGLinearGradientElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGLinearGradientElementPrototype>(realm, "SVGLinearGradientElement"_fly_string));
}
void SVGLinearGradientElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -25,7 +25,7 @@ SVGMaskElement::~SVGMaskElement() = default;
void SVGMaskElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGMaskElementPrototype>(realm, "SVGMaskElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGMaskElementPrototype>(realm, "SVGMaskElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGMaskElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -92,7 +92,7 @@ SVGPathElement::SVGPathElement(DOM::Document& document, DOM::QualifiedName quali
void SVGPathElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPathElementPrototype>(realm, "SVGPathElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPathElementPrototype>(realm, "SVGPathElement"_fly_string));
}
void SVGPathElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -21,7 +21,7 @@ SVGPolygonElement::SVGPolygonElement(DOM::Document& document, DOM::QualifiedName
void SVGPolygonElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPolygonElementPrototype>(realm, "SVGPolygonElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPolygonElementPrototype>(realm, "SVGPolygonElement"_fly_string));
}
void SVGPolygonElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -21,7 +21,7 @@ SVGPolylineElement::SVGPolylineElement(DOM::Document& document, DOM::QualifiedNa
void SVGPolylineElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPolylineElementPrototype>(realm, "SVGPolylineElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGPolylineElementPrototype>(realm, "SVGPolylineElement"_fly_string));
}
void SVGPolylineElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -20,7 +20,7 @@ SVGRadialGradientElement::SVGRadialGradientElement(DOM::Document& document, DOM:
void SVGRadialGradientElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGRadialGradientElementPrototype>(realm, "SVGRadialGradientElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGRadialGradientElementPrototype>(realm, "SVGRadialGradientElement"_fly_string));
}
void SVGRadialGradientElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -23,7 +23,7 @@ SVGRectElement::SVGRectElement(DOM::Document& document, DOM::QualifiedName quali
void SVGRectElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGRectElementPrototype>(realm, "SVGRectElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGRectElementPrototype>(realm, "SVGRectElement"_fly_string));
}
void SVGRectElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -28,7 +28,7 @@ SVGSVGElement::SVGSVGElement(DOM::Document& document, DOM::QualifiedName qualifi
void SVGSVGElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGSVGElementPrototype>(realm, "SVGSVGElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGSVGElementPrototype>(realm, "SVGSVGElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGSVGElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -21,7 +21,7 @@ SVGScriptElement::SVGScriptElement(DOM::Document& document, DOM::QualifiedName q
void SVGScriptElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGScriptElementPrototype>(realm, "SVGScriptElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGScriptElementPrototype>(realm, "SVGScriptElement"_fly_string));
}
void SVGScriptElement::visit_edges(Cell::Visitor& visitor)

View file

@ -68,7 +68,7 @@ JS::NonnullGCPtr<SVGAnimatedNumber> SVGStopElement::offset() const
void SVGStopElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGStopElementPrototype>(realm, "SVGStopElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGStopElementPrototype>(realm, "SVGStopElement"_fly_string));
}
}

View file

@ -20,7 +20,7 @@ SVGStyleElement::~SVGStyleElement() = default;
void SVGStyleElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGStyleElementPrototype>(realm, "SVGStyleElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGStyleElementPrototype>(realm, "SVGStyleElement"_fly_string));
}
void SVGStyleElement::visit_edges(Cell::Visitor& visitor)

View file

@ -27,7 +27,7 @@ SVGSymbolElement::SVGSymbolElement(DOM::Document& document, DOM::QualifiedName q
void SVGSymbolElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGSymbolElementPrototype>(realm, "SVGSymbolElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGSymbolElementPrototype>(realm, "SVGSymbolElement"_fly_string));
}
// https://svgwg.org/svg2-draft/struct.html#SymbolNotes

View file

@ -20,7 +20,7 @@ SVGTSpanElement::SVGTSpanElement(DOM::Document& document, DOM::QualifiedName qua
void SVGTSpanElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTSpanElementPrototype>(realm, "SVGTSpanElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTSpanElementPrototype>(realm, "SVGTSpanElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGTSpanElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -26,7 +26,7 @@ SVGTextContentElement::SVGTextContentElement(DOM::Document& document, DOM::Quali
void SVGTextContentElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextContentElementPrototype>(realm, "SVGTextContentElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextContentElementPrototype>(realm, "SVGTextContentElement"_fly_string));
}
Optional<TextAnchor> SVGTextContentElement::text_anchor() const

View file

@ -19,7 +19,7 @@ SVGTextElement::SVGTextElement(DOM::Document& document, DOM::QualifiedName quali
void SVGTextElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextElementPrototype>(realm, "SVGTextElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextElementPrototype>(realm, "SVGTextElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGTextElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)

View file

@ -25,7 +25,7 @@ SVGTextPositioningElement::SVGTextPositioningElement(DOM::Document& document, DO
void SVGTextPositioningElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextPositioningElementPrototype>(realm, "SVGTextPositioningElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTextPositioningElementPrototype>(realm, "SVGTextPositioningElement"_fly_string));
}
void SVGTextPositioningElement::attribute_changed(FlyString const& name, Optional<String> const& value)

View file

@ -21,7 +21,7 @@ SVGTitleElement::SVGTitleElement(DOM::Document& document, DOM::QualifiedName qua
void SVGTitleElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTitleElementPrototype>(realm, "SVGTitleElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGTitleElementPrototype>(realm, "SVGTitleElement"_fly_string));
}
JS::GCPtr<Layout::Node> SVGTitleElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties>)

View file

@ -27,7 +27,7 @@ SVGUseElement::SVGUseElement(DOM::Document& document, DOM::QualifiedName qualifi
void SVGUseElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGUseElementPrototype>(realm, "SVGUseElement"));
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGUseElementPrototype>(realm, "SVGUseElement"_fly_string));
// The shadow tree is open (inspectable by script), but read-only.
auto shadow_root = heap().allocate<DOM::ShadowRoot>(realm, document(), *this, Bindings::ShadowRootMode::Open);