mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so let's rename it to A) match the name of DeprecatedString, B) write a new FlyString class that is tied to String.
This commit is contained in:
parent
2eacc7aec1
commit
f3db548a3d
316 changed files with 1177 additions and 1177 deletions
|
@ -10,7 +10,7 @@ namespace Web {
|
|||
namespace HTML {
|
||||
namespace AttributeNames {
|
||||
|
||||
#define __ENUMERATE_HTML_ATTRIBUTE(name) FlyString name;
|
||||
#define __ENUMERATE_HTML_ATTRIBUTE(name) DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_ATTRIBUTES
|
||||
#undef __ENUMERATE_HTML_ATTRIBUTE
|
||||
|
||||
|
@ -41,7 +41,7 @@ ENUMERATE_HTML_ATTRIBUTES
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#boolean-attribute
|
||||
bool is_boolean_attribute(FlyString const& attribute)
|
||||
bool is_boolean_attribute(DeprecatedFlyString const& attribute)
|
||||
{
|
||||
// NOTE: This is the list of attributes from https://html.spec.whatwg.org/#attributes-3
|
||||
// with a Value column value of "Boolean attribute".
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
|
||||
namespace Web {
|
||||
namespace HTML {
|
||||
|
@ -229,13 +229,13 @@ namespace AttributeNames {
|
|||
__ENUMERATE_HTML_ATTRIBUTE(width) \
|
||||
__ENUMERATE_HTML_ATTRIBUTE(wrap)
|
||||
|
||||
#define __ENUMERATE_HTML_ATTRIBUTE(name) extern FlyString name;
|
||||
#define __ENUMERATE_HTML_ATTRIBUTE(name) extern DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_ATTRIBUTES
|
||||
#undef __ENUMERATE_HTML_ATTRIBUTE
|
||||
|
||||
}
|
||||
|
||||
bool is_boolean_attribute(FlyString const& attribute);
|
||||
bool is_boolean_attribute(DeprecatedFlyString const& attribute);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
CloseEvent* CloseEvent::create(JS::Realm& realm, FlyString const& event_name, CloseEventInit const& event_init)
|
||||
CloseEvent* CloseEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<CloseEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
CloseEvent* CloseEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, CloseEventInit const& event_init)
|
||||
CloseEvent* CloseEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
CloseEvent::CloseEvent(JS::Realm& realm, FlyString const& event_name, CloseEventInit const& event_init)
|
||||
CloseEvent::CloseEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name, event_init)
|
||||
, m_was_clean(event_init.was_clean)
|
||||
, m_code(event_init.code)
|
||||
|
|
|
@ -21,8 +21,8 @@ class CloseEvent : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(CloseEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static CloseEvent* create(JS::Realm&, FlyString const& event_name, CloseEventInit const& event_init = {});
|
||||
static CloseEvent* construct_impl(JS::Realm&, FlyString const& event_name, CloseEventInit const& event_init);
|
||||
static CloseEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init = {});
|
||||
static CloseEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init);
|
||||
|
||||
virtual ~CloseEvent() override;
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
DeprecatedString reason() const { return m_reason; }
|
||||
|
||||
private:
|
||||
CloseEvent(JS::Realm&, FlyString const& event_name, CloseEventInit const& event_init);
|
||||
CloseEvent(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init);
|
||||
|
||||
bool m_was_clean { false };
|
||||
u16 m_code { 0 };
|
||||
|
|
|
@ -59,7 +59,7 @@ Vector<CrossOriginProperty> cross_origin_properties(Variant<Bindings::LocationOb
|
|||
bool is_cross_origin_accessible_window_property_name(JS::PropertyKey const& property_key)
|
||||
{
|
||||
// A JavaScript property name P is a cross-origin accessible window property name if it is "window", "self", "location", "close", "closed", "focus", "blur", "frames", "length", "top", "opener", "parent", "postMessage", or an array index property name.
|
||||
static Array<FlyString, 13> property_names {
|
||||
static Array<DeprecatedFlyString, 13> property_names {
|
||||
"window"sv, "self"sv, "location"sv, "close"sv, "closed"sv, "focus"sv, "blur"sv, "frames"sv, "length"sv, "top"sv, "opener"sv, "parent"sv, "postMessage"sv
|
||||
};
|
||||
return (property_key.is_string() && any_of(property_names, [&](auto const& name) { return property_key.as_string() == name; })) || property_key.is_number();
|
||||
|
|
|
@ -183,7 +183,7 @@ bool DOMStringMap::delete_existing_named_property(DeprecatedString const& name)
|
|||
return true;
|
||||
}
|
||||
|
||||
JS::Value DOMStringMap::named_item_value(FlyString const& name) const
|
||||
JS::Value DOMStringMap::named_item_value(DeprecatedFlyString const& name) const
|
||||
{
|
||||
return JS::PrimitiveString::create(vm(), determine_value_of_named_property(name));
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ private:
|
|||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
// ^LegacyPlatformObject
|
||||
virtual JS::Value named_item_value(FlyString const&) const override;
|
||||
virtual JS::Value named_item_value(DeprecatedFlyString const&) const override;
|
||||
virtual Vector<DeprecatedString> supported_property_names() const override;
|
||||
|
||||
struct NameValuePair {
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
ErrorEvent* ErrorEvent::create(JS::Realm& realm, FlyString const& event_name, ErrorEventInit const& event_init)
|
||||
ErrorEvent* ErrorEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<ErrorEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
ErrorEvent* ErrorEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, ErrorEventInit const& event_init)
|
||||
ErrorEvent* ErrorEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
ErrorEvent::ErrorEvent(JS::Realm& realm, FlyString const& event_name, ErrorEventInit const& event_init)
|
||||
ErrorEvent::ErrorEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name)
|
||||
, m_message(event_init.message)
|
||||
, m_filename(event_init.filename)
|
||||
|
|
|
@ -24,8 +24,8 @@ class ErrorEvent final : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(ErrorEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static ErrorEvent* create(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init = {});
|
||||
static ErrorEvent* construct_impl(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
|
||||
static ErrorEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init = {});
|
||||
static ErrorEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init);
|
||||
|
||||
virtual ~ErrorEvent() override;
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
JS::Value error() const { return m_error; }
|
||||
|
||||
private:
|
||||
ErrorEvent(JS::Realm&, FlyString const& event_name, ErrorEventInit const& event_init);
|
||||
ErrorEvent(JS::Realm&, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace Web::HTML::EventNames {
|
||||
|
||||
#define __ENUMERATE_HTML_EVENT(name) FlyString name;
|
||||
#define __ENUMERATE_HTML_EVENT(name) DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_EVENTS
|
||||
#undef __ENUMERATE_HTML_EVENT
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
|
||||
namespace Web::HTML::EventNames {
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace Web::HTML::EventNames {
|
|||
__ENUMERATE_HTML_EVENT(unload) \
|
||||
__ENUMERATE_HTML_EVENT(visibilitychange)
|
||||
|
||||
#define __ENUMERATE_HTML_EVENT(name) extern FlyString name;
|
||||
#define __ENUMERATE_HTML_EVENT(name) extern DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_EVENTS
|
||||
#undef __ENUMERATE_HTML_EVENT
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
#undef __ENUMERATE
|
||||
|
||||
protected:
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(FlyString const& event_name) = 0;
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const& event_name) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, DOM::QualifiedName
|
|||
|
||||
HTMLAnchorElement::~HTMLAnchorElement() = default;
|
||||
|
||||
void HTMLAnchorElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLAnchorElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name == HTML::AttributeNames::href) {
|
||||
|
@ -85,7 +85,7 @@ i32 HTMLAnchorElement::default_tab_index_value() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
FlyString HTMLAnchorElement::default_role() const
|
||||
DeprecatedFlyString HTMLAnchorElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-a-no-href
|
||||
if (!href().is_null())
|
||||
|
|
|
@ -35,7 +35,7 @@ private:
|
|||
void run_activation_behavior(Web::DOM::Event const&);
|
||||
|
||||
// ^DOM::Element
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
|
||||
// ^HTML::HTMLHyperlinkElementUtils
|
||||
|
@ -51,7 +51,7 @@ private:
|
|||
queue_an_element_task(source, move(steps));
|
||||
}
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ HTMLAreaElement::HTMLAreaElement(DOM::Document& document, DOM::QualifiedName qua
|
|||
|
||||
HTMLAreaElement::~HTMLAreaElement() = default;
|
||||
|
||||
void HTMLAreaElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLAreaElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name == HTML::AttributeNames::href) {
|
||||
|
@ -43,7 +43,7 @@ i32 HTMLAreaElement::default_tab_index_value() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
FlyString HTMLAreaElement::default_role() const
|
||||
DeprecatedFlyString HTMLAreaElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-area-no-href
|
||||
if (!href().is_null())
|
||||
|
|
|
@ -24,7 +24,7 @@ private:
|
|||
HTMLAreaElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
// ^DOM::Element
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
|
||||
// ^HTML::HTMLHyperlinkElementUtils
|
||||
|
@ -40,7 +40,7 @@ private:
|
|||
queue_an_element_task(source, move(steps));
|
||||
}
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ void HTMLBaseElement::removed_from(Node* parent)
|
|||
document().update_base_element({});
|
||||
}
|
||||
|
||||
void HTMLBaseElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLBaseElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
private:
|
||||
HTMLBaseElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -38,7 +38,7 @@ void HTMLBodyElement::apply_presentational_hints(CSS::StyleProperties& style) co
|
|||
});
|
||||
}
|
||||
|
||||
void HTMLBodyElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLBodyElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name.equals_ignoring_case("link"sv)) {
|
||||
|
@ -71,7 +71,7 @@ void HTMLBodyElement::parse_attribute(FlyString const& name, DeprecatedString co
|
|||
#undef __ENUMERATE
|
||||
}
|
||||
|
||||
DOM::EventTarget& HTMLBodyElement::global_event_handlers_to_event_target(FlyString const& event_name)
|
||||
DOM::EventTarget& HTMLBodyElement::global_event_handlers_to_event_target(DeprecatedFlyString const& event_name)
|
||||
{
|
||||
// NOTE: This is a little weird, but IIUC document.body.onload actually refers to window.onload
|
||||
// NOTE: document.body can return either a HTMLBodyElement or HTMLFrameSetElement, so both these elements must support this mapping.
|
||||
|
|
|
@ -20,17 +20,17 @@ class HTMLBodyElement final
|
|||
public:
|
||||
virtual ~HTMLBodyElement() override;
|
||||
|
||||
virtual void parse_attribute(FlyString const&, DeprecatedString const&) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override;
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-body
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::generic; };
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; };
|
||||
|
||||
private:
|
||||
HTMLBodyElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
// ^HTML::GlobalEventHandlers
|
||||
virtual EventTarget& global_event_handlers_to_event_target(FlyString const& event_name) override;
|
||||
virtual EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const& event_name) override;
|
||||
|
||||
// ^HTML::WindowEventHandlers
|
||||
virtual EventTarget& window_event_handlers_to_event_target() override;
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
virtual bool is_labelable() const override { return true; }
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-button
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::button; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::button; }
|
||||
|
||||
private:
|
||||
HTMLButtonElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLDataElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-data
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
|
||||
private:
|
||||
HTMLDataElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -17,7 +17,7 @@ class HTMLDataListElement final : public HTMLElement {
|
|||
public:
|
||||
virtual ~HTMLDataListElement() override;
|
||||
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::listbox; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::listbox; }
|
||||
|
||||
private:
|
||||
HTMLDataListElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLDetailsElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-details
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::group; };
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::group; };
|
||||
|
||||
private:
|
||||
HTMLDetailsElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLDialogElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-dialog
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::dialog; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::dialog; }
|
||||
|
||||
private:
|
||||
HTMLDialogElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLDivElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-div
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
|
||||
private:
|
||||
HTMLDivElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -232,7 +232,7 @@ bool HTMLElement::cannot_navigate() const
|
|||
return !is<HTML::HTMLAnchorElement>(this) && !is_connected();
|
||||
}
|
||||
|
||||
void HTMLElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
Element::parse_attribute(name, value);
|
||||
|
||||
|
@ -270,7 +270,7 @@ void HTMLElement::focus()
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-synthetic-pointer-event
|
||||
bool HTMLElement::fire_a_synthetic_pointer_event(FlyString const& type, DOM::Element& target, bool not_trusted)
|
||||
bool HTMLElement::fire_a_synthetic_pointer_event(DeprecatedFlyString const& type, DOM::Element& target, bool not_trusted)
|
||||
{
|
||||
// 1. Let event be the result of creating an event using PointerEvent.
|
||||
// 2. Initialize event's type attribute to e.
|
||||
|
@ -328,7 +328,7 @@ void HTMLElement::blur()
|
|||
// User agents may selectively or uniformly ignore calls to this method for usability reasons.
|
||||
}
|
||||
|
||||
FlyString HTMLElement::default_role() const
|
||||
DeprecatedFlyString HTMLElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-article
|
||||
if (local_name() == TagNames::article)
|
||||
|
|
|
@ -54,19 +54,19 @@ public:
|
|||
|
||||
void blur();
|
||||
|
||||
bool fire_a_synthetic_pointer_event(FlyString const& type, DOM::Element& target, bool not_trusted);
|
||||
bool fire_a_synthetic_pointer_event(DeprecatedFlyString const& type, DOM::Element& target, bool not_trusted);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
virtual bool is_labelable() const { return false; }
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
protected:
|
||||
HTMLElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
@ -74,7 +74,7 @@ private:
|
|||
virtual bool is_html_element() const final { return true; }
|
||||
|
||||
// ^HTML::GlobalEventHandlers
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(FlyString const&) override { return *this; }
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const&) override { return *this; }
|
||||
|
||||
enum class ContentEditableState {
|
||||
True,
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
|
||||
virtual bool is_auto_capitalize_inheriting() const override { return true; }
|
||||
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::group; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::group; }
|
||||
|
||||
private:
|
||||
HTMLFieldSetElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
unsigned length() const;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-form
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::form; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::form; }
|
||||
|
||||
private:
|
||||
HTMLFormElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, DOM::Qualified
|
|||
|
||||
HTMLFrameSetElement::~HTMLFrameSetElement() = default;
|
||||
|
||||
void HTMLFrameSetElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLFrameSetElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
|
||||
|
@ -31,7 +31,7 @@ void HTMLFrameSetElement::parse_attribute(FlyString const& name, DeprecatedStrin
|
|||
#undef __ENUMERATE
|
||||
}
|
||||
|
||||
DOM::EventTarget& HTMLFrameSetElement::global_event_handlers_to_event_target(FlyString const& event_name)
|
||||
DOM::EventTarget& HTMLFrameSetElement::global_event_handlers_to_event_target(DeprecatedFlyString const& event_name)
|
||||
{
|
||||
// NOTE: This is a little weird, but IIUC document.body.onload actually refers to window.onload
|
||||
// NOTE: document.body can return either a HTMLBodyElement or HTMLFrameSetElement, so both these elements must support this mapping.
|
||||
|
|
|
@ -23,11 +23,11 @@ public:
|
|||
private:
|
||||
HTMLFrameSetElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void parse_attribute(FlyString const&, DeprecatedString const&) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override;
|
||||
|
||||
private:
|
||||
// ^HTML::GlobalEventHandlers
|
||||
virtual EventTarget& global_event_handlers_to_event_target(FlyString const& event_name) override;
|
||||
virtual EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const& event_name) override;
|
||||
|
||||
// ^HTML::WindowEventHandlers
|
||||
virtual EventTarget& window_event_handlers_to_event_target() override;
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLHRElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-hr
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::separator; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::separator; }
|
||||
|
||||
private:
|
||||
HTMLHRElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-h1-h6
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::heading; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::heading; }
|
||||
virtual DeprecatedString aria_level() const override
|
||||
{
|
||||
// TODO: aria-level = the number in the element's tag name
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
bool should_use_body_background_properties() const;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-html
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::document; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::document; }
|
||||
|
||||
private:
|
||||
HTMLHtmlElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -27,7 +27,7 @@ JS::GCPtr<Layout::Node> HTMLIFrameElement::create_layout_node(NonnullRefPtr<CSS:
|
|||
return heap().allocate_without_realm<Layout::FrameBox>(document(), *this, move(style));
|
||||
}
|
||||
|
||||
void HTMLIFrameElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLIFrameElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name == HTML::AttributeNames::src)
|
||||
|
|
|
@ -31,7 +31,7 @@ private:
|
|||
// ^DOM::Element
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
|
||||
|
|
|
@ -73,7 +73,7 @@ void HTMLImageElement::apply_presentational_hints(CSS::StyleProperties& style) c
|
|||
});
|
||||
}
|
||||
|
||||
void HTMLImageElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLImageElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
|
||||
|
@ -198,7 +198,7 @@ bool HTMLImageElement::complete() const
|
|||
return false;
|
||||
}
|
||||
|
||||
FlyString HTMLImageElement::default_role() const
|
||||
DeprecatedFlyString HTMLImageElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-img
|
||||
// https://www.w3.org/TR/html-aria/#el-img-no-alt
|
||||
|
|
|
@ -24,7 +24,7 @@ class HTMLImageElement final
|
|||
public:
|
||||
virtual ~HTMLImageElement() override;
|
||||
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
DeprecatedString alt() const { return attribute(HTML::AttributeNames::alt); }
|
||||
DeprecatedString src() const { return attribute(HTML::AttributeNames::src); }
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete
|
||||
bool complete() const;
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLImageElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -404,7 +404,7 @@ void HTMLInputElement::did_receive_focus()
|
|||
browsing_context->set_cursor_position(DOM::Position { *m_text_node, 0 });
|
||||
}
|
||||
|
||||
void HTMLInputElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLInputElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name == HTML::AttributeNames::checked) {
|
||||
|
@ -434,7 +434,7 @@ HTMLInputElement::TypeAttributeState HTMLInputElement::parse_type_attribute(Stri
|
|||
return HTMLInputElement::TypeAttributeState::Text;
|
||||
}
|
||||
|
||||
void HTMLInputElement::did_remove_attribute(FlyString const& name)
|
||||
void HTMLInputElement::did_remove_attribute(DeprecatedFlyString const& name)
|
||||
{
|
||||
HTMLElement::did_remove_attribute(name);
|
||||
if (name == HTML::AttributeNames::checked) {
|
||||
|
@ -866,7 +866,7 @@ WebIDL::ExceptionOr<void> HTMLInputElement::set_selection_range(u32 start, u32 e
|
|||
return {};
|
||||
}
|
||||
|
||||
FlyString HTMLInputElement::default_role() const
|
||||
DeprecatedFlyString HTMLInputElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-input-button
|
||||
if (type_state() == TypeAttributeState::Button)
|
||||
|
|
|
@ -96,8 +96,8 @@ public:
|
|||
virtual bool is_focusable() const override { return m_type != TypeAttributeState::Hidden; }
|
||||
|
||||
// ^HTMLElement
|
||||
virtual void parse_attribute(FlyString const&, DeprecatedString const&) override;
|
||||
virtual void did_remove_attribute(FlyString const&) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override;
|
||||
virtual void did_remove_attribute(DeprecatedFlyString const&) override;
|
||||
|
||||
// ^FormAssociatedElement
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
virtual bool is_labelable() const override { return type_state() != TypeAttributeState::Hidden; }
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLInputElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLLIElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-li
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::listitem; };
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::listitem; };
|
||||
|
||||
private:
|
||||
HTMLLIElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -69,7 +69,7 @@ bool HTMLLinkElement::has_loaded_icon() const
|
|||
return m_relationship & Relationship::Icon && resource() && resource()->is_loaded() && resource()->has_encoded_data();
|
||||
}
|
||||
|
||||
void HTMLLinkElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLLinkElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
// 4.6.7 Link types - https://html.spec.whatwg.org/multipage/links.html#linkTypes
|
||||
if (name == HTML::AttributeNames::rel) {
|
||||
|
@ -118,7 +118,7 @@ void HTMLLinkElement::resource_did_load()
|
|||
resource_did_load_favicon();
|
||||
}
|
||||
|
||||
void HTMLLinkElement::did_remove_attribute(FlyString const& attr)
|
||||
void HTMLLinkElement::did_remove_attribute(DeprecatedFlyString const& attr)
|
||||
{
|
||||
if (attr == HTML::AttributeNames::disabled && (m_relationship & Relationship::Stylesheet)) {
|
||||
if (!resource())
|
||||
|
|
|
@ -33,14 +33,14 @@ public:
|
|||
private:
|
||||
HTMLLinkElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
void parse_attribute(FlyString const&, DeprecatedString const&) override;
|
||||
void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override;
|
||||
|
||||
// ^ResourceClient
|
||||
virtual void resource_did_fail() override;
|
||||
virtual void resource_did_load() override;
|
||||
|
||||
// ^ HTMLElement
|
||||
virtual void did_remove_attribute(FlyString const&) override;
|
||||
virtual void did_remove_attribute(DeprecatedFlyString const&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void resource_did_load_stylesheet();
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLMenuElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-menu
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
|
||||
private:
|
||||
HTMLMenuElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
virtual bool is_labelable() const override { return true; }
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-meter
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::meter; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::meter; }
|
||||
|
||||
private:
|
||||
HTMLMeterElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ HTMLModElement::HTMLModElement(DOM::Document& document, DOM::QualifiedName quali
|
|||
|
||||
HTMLModElement::~HTMLModElement() = default;
|
||||
|
||||
FlyString HTMLModElement::default_role() const
|
||||
DeprecatedFlyString HTMLModElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-del
|
||||
if (local_name() == TagNames::del)
|
||||
|
|
|
@ -17,7 +17,7 @@ class HTMLModElement final : public HTMLElement {
|
|||
public:
|
||||
virtual ~HTMLModElement() override;
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLModElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLOListElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-ol
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
|
||||
private:
|
||||
HTMLOListElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -32,7 +32,7 @@ HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName
|
|||
|
||||
HTMLObjectElement::~HTMLObjectElement() = default;
|
||||
|
||||
void HTMLObjectElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLObjectElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
BrowsingContextContainer::parse_attribute(name, value);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class HTMLObjectElement final
|
|||
public:
|
||||
virtual ~HTMLObjectElement() override;
|
||||
|
||||
virtual void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
|
||||
DeprecatedString data() const;
|
||||
void set_data(DeprecatedString const& data) { MUST(set_attribute(HTML::AttributeNames::data, data)); }
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLOptGroupElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-optgroup
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::group; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::group; }
|
||||
|
||||
private:
|
||||
HTMLOptGroupElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -26,7 +26,7 @@ HTMLOptionElement::HTMLOptionElement(DOM::Document& document, DOM::QualifiedName
|
|||
|
||||
HTMLOptionElement::~HTMLOptionElement() = default;
|
||||
|
||||
void HTMLOptionElement::parse_attribute(FlyString const& name, DeprecatedString const& value)
|
||||
void HTMLOptionElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
|
||||
|
@ -39,7 +39,7 @@ void HTMLOptionElement::parse_attribute(FlyString const& name, DeprecatedString
|
|||
}
|
||||
}
|
||||
|
||||
void HTMLOptionElement::did_remove_attribute(FlyString const& name)
|
||||
void HTMLOptionElement::did_remove_attribute(DeprecatedFlyString const& name)
|
||||
{
|
||||
HTMLElement::did_remove_attribute(name);
|
||||
|
||||
|
@ -141,7 +141,7 @@ bool HTMLOptionElement::disabled() const
|
|||
|| (parent() && is<HTMLOptGroupElement>(parent()) && static_cast<HTMLOptGroupElement const&>(*parent()).has_attribute(AttributeNames::disabled));
|
||||
}
|
||||
|
||||
FlyString HTMLOptionElement::default_role() const
|
||||
DeprecatedFlyString HTMLOptionElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-option
|
||||
// TODO: Only an option element that is in a list of options or that represents a suggestion in a datalist should return option
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
bool disabled() const;
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
friend class Bindings::OptionConstructor;
|
||||
|
@ -38,8 +38,8 @@ private:
|
|||
|
||||
HTMLOptionElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
void parse_attribute(FlyString const& name, DeprecatedString const& value) override;
|
||||
void did_remove_attribute(FlyString const& name) override;
|
||||
void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
|
||||
void did_remove_attribute(DeprecatedFlyString const& name) override;
|
||||
|
||||
void ask_for_a_reset();
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
virtual void reset_algorithm() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-output
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::status; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::status; }
|
||||
|
||||
private:
|
||||
HTMLOutputElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-p
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::paragraph; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::paragraph; }
|
||||
|
||||
private:
|
||||
HTMLParagraphElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLPreElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-pre
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
|
||||
private:
|
||||
HTMLPreElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
bool using_system_appearance() const;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-progress
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::progressbar; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::progressbar; }
|
||||
|
||||
private:
|
||||
HTMLProgressElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -19,7 +19,7 @@ HTMLQuoteElement::HTMLQuoteElement(DOM::Document& document, DOM::QualifiedName q
|
|||
|
||||
HTMLQuoteElement::~HTMLQuoteElement() = default;
|
||||
|
||||
FlyString HTMLQuoteElement::default_role() const
|
||||
DeprecatedFlyString HTMLQuoteElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-blockquote
|
||||
if (local_name() == TagNames::blockquote)
|
||||
|
|
|
@ -16,7 +16,7 @@ class HTMLQuoteElement final : public HTMLElement {
|
|||
public:
|
||||
virtual ~HTMLQuoteElement() override;
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLQuoteElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -57,7 +57,7 @@ DOM::Element* HTMLSelectElement::item(size_t index)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-select-nameditem
|
||||
DOM::Element* HTMLSelectElement::named_item(FlyString const& name)
|
||||
DOM::Element* HTMLSelectElement::named_item(DeprecatedFlyString const& name)
|
||||
{
|
||||
// The namedItem(name) method must return the value returned by the method of the same name on the options collection, when invoked with the same argument.
|
||||
return const_cast<HTMLOptionsCollection&>(*options()).named_item(name);
|
||||
|
@ -156,7 +156,7 @@ DeprecatedString const& HTMLSelectElement::type() const
|
|||
return select_multiple;
|
||||
}
|
||||
|
||||
FlyString HTMLSelectElement::default_role() const
|
||||
DeprecatedFlyString HTMLSelectElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-select-multiple-or-size-greater-1
|
||||
if (has_attribute("multiple"))
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
size_t length();
|
||||
DOM::Element* item(size_t index);
|
||||
DOM::Element* named_item(FlyString const& name);
|
||||
DOM::Element* named_item(DeprecatedFlyString const& name);
|
||||
WebIDL::ExceptionOr<void> add(HTMLOptionOrOptGroupElement element, Optional<HTMLElementOrElementIndex> before = {});
|
||||
|
||||
int selected_index() const;
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
DeprecatedString const& type() const;
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLSelectElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLSpanElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-span
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; }
|
||||
|
||||
private:
|
||||
HTMLSpanElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-caption
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::caption; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::caption; }
|
||||
|
||||
private:
|
||||
HTMLTableCaptionElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -69,7 +69,7 @@ void HTMLTableCellElement::set_row_span(unsigned int value)
|
|||
MUST(set_attribute(HTML::AttributeNames::rowspan, DeprecatedString::number(value)));
|
||||
}
|
||||
|
||||
FlyString HTMLTableCellElement::default_role() const
|
||||
DeprecatedFlyString HTMLTableCellElement::default_role() const
|
||||
{
|
||||
// TODO: For td:
|
||||
// role=cell if the ancestor table element is exposed as a role=table
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
void set_col_span(unsigned);
|
||||
void set_row_span(unsigned);
|
||||
|
||||
virtual FlyString default_role() const override;
|
||||
virtual DeprecatedFlyString default_role() const override;
|
||||
|
||||
private:
|
||||
HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> delete_row(long index);
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-table
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::table; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::table; }
|
||||
|
||||
private:
|
||||
HTMLTableElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> delete_cell(i32 index);
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-tr
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::row; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::row; }
|
||||
|
||||
private:
|
||||
HTMLTableRowElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
// https://www.w3.org/TR/html-aria/#el-tbody
|
||||
// https://www.w3.org/TR/html-aria/#el-tfoot
|
||||
// https://www.w3.org/TR/html-aria/#el-thead
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::rowgroup; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::rowgroup; }
|
||||
|
||||
private:
|
||||
HTMLTableSectionElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
virtual void reset_algorithm() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-textarea
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::textbox; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::textbox; }
|
||||
|
||||
private:
|
||||
HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLTimeElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-time
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::time; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::time; }
|
||||
|
||||
private:
|
||||
HTMLTimeElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
virtual ~HTMLUListElement() override;
|
||||
|
||||
// https://www.w3.org/TR/html-aria/#el-ul
|
||||
virtual FlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::list; }
|
||||
|
||||
private:
|
||||
HTMLUListElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
MessageEvent* MessageEvent::create(JS::Realm& realm, FlyString const& event_name, MessageEventInit const& event_init)
|
||||
MessageEvent* MessageEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, MessageEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<MessageEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
MessageEvent* MessageEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, MessageEventInit const& event_init)
|
||||
MessageEvent* MessageEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, MessageEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
MessageEvent::MessageEvent(JS::Realm& realm, FlyString const& event_name, MessageEventInit const& event_init)
|
||||
MessageEvent::MessageEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, MessageEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name, event_init)
|
||||
, m_data(event_init.data)
|
||||
, m_origin(event_init.origin)
|
||||
|
|
|
@ -21,10 +21,10 @@ class MessageEvent : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(MessageEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static MessageEvent* create(JS::Realm&, FlyString const& event_name, MessageEventInit const& event_init = {});
|
||||
static MessageEvent* construct_impl(JS::Realm&, FlyString const& event_name, MessageEventInit const& event_init);
|
||||
static MessageEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, MessageEventInit const& event_init = {});
|
||||
static MessageEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, MessageEventInit const& event_init);
|
||||
|
||||
MessageEvent(JS::Realm&, FlyString const& event_name, MessageEventInit const& event_init);
|
||||
MessageEvent(JS::Realm&, DeprecatedFlyString const& event_name, MessageEventInit const& event_init);
|
||||
virtual ~MessageEvent() override;
|
||||
|
||||
JS::Value data() const { return m_data; }
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
PageTransitionEvent* PageTransitionEvent::create(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
PageTransitionEvent* PageTransitionEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<PageTransitionEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
PageTransitionEvent* PageTransitionEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
PageTransitionEvent* PageTransitionEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
PageTransitionEvent::PageTransitionEvent(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
PageTransitionEvent::PageTransitionEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name, event_init)
|
||||
, m_persisted(event_init.persisted)
|
||||
{
|
||||
|
|
|
@ -18,10 +18,10 @@ class PageTransitionEvent final : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(PageTransitionEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static PageTransitionEvent* create(JS::Realm&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
static PageTransitionEvent* construct_impl(JS::Realm&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
static PageTransitionEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
static PageTransitionEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
|
||||
PageTransitionEvent(JS::Realm&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
PageTransitionEvent(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
|
||||
virtual ~PageTransitionEvent() override;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ static inline void log_parse_error(SourceLocation const& location = SourceLocati
|
|||
dbgln_if(HTML_PARSER_DEBUG, "Parse error! {}", location);
|
||||
}
|
||||
|
||||
static Vector<FlyString> s_quirks_public_ids = {
|
||||
static Vector<DeprecatedFlyString> s_quirks_public_ids = {
|
||||
"+//Silmaril//dtd html Pro v0r11 19970101//",
|
||||
"-//AS//DTD HTML 3.0 asWedit + extensions//",
|
||||
"-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//",
|
||||
|
@ -616,7 +616,7 @@ HTMLParser::AdjustedInsertionLocation HTMLParser::find_appropriate_place_for_ins
|
|||
return adjusted_insertion_location;
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<DOM::Element> HTMLParser::create_element_for(HTMLToken const& token, FlyString const& namespace_, DOM::Node const& intended_parent)
|
||||
JS::NonnullGCPtr<DOM::Element> HTMLParser::create_element_for(HTMLToken const& token, DeprecatedFlyString const& namespace_, DOM::Node const& intended_parent)
|
||||
{
|
||||
// FIXME: 1. If the active speculative HTML parser is not null, then return the result of creating a speculative mock element given given namespace, the tag name of the given token, and the attributes of the given token.
|
||||
// FIXME: 2. Otherwise, optionally create a speculative mock element given given namespace, the tag name of the given token, and the attributes of the given token.
|
||||
|
@ -681,7 +681,7 @@ JS::NonnullGCPtr<DOM::Element> HTMLParser::create_element_for(HTMLToken const& t
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element
|
||||
JS::NonnullGCPtr<DOM::Element> HTMLParser::insert_foreign_element(HTMLToken const& token, FlyString const& namespace_)
|
||||
JS::NonnullGCPtr<DOM::Element> HTMLParser::insert_foreign_element(HTMLToken const& token, DeprecatedFlyString const& namespace_)
|
||||
{
|
||||
auto adjusted_insertion_location = find_appropriate_place_for_inserting_node();
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ AnythingElse:
|
|||
process_using_the_rules_for(m_insertion_mode, token);
|
||||
}
|
||||
|
||||
void HTMLParser::generate_implied_end_tags(FlyString const& exception)
|
||||
void HTMLParser::generate_implied_end_tags(DeprecatedFlyString const& exception)
|
||||
{
|
||||
while (current_node().local_name() != exception && current_node().local_name().is_one_of(HTML::TagNames::dd, HTML::TagNames::dt, HTML::TagNames::li, HTML::TagNames::optgroup, HTML::TagNames::option, HTML::TagNames::p, HTML::TagNames::rb, HTML::TagNames::rp, HTML::TagNames::rt, HTML::TagNames::rtc))
|
||||
(void)m_stack_of_open_elements.pop();
|
||||
|
@ -1365,7 +1365,7 @@ HTMLParser::AdoptionAgencyAlgorithmOutcome HTMLParser::run_the_adoption_agency_a
|
|||
}
|
||||
}
|
||||
|
||||
bool HTMLParser::is_special_tag(FlyString const& tag_name, FlyString const& namespace_)
|
||||
bool HTMLParser::is_special_tag(DeprecatedFlyString const& tag_name, DeprecatedFlyString const& namespace_)
|
||||
{
|
||||
if (namespace_ == Namespace::HTML) {
|
||||
return tag_name.is_one_of(
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
InsertionMode insertion_mode() const { return m_insertion_mode; }
|
||||
|
||||
static bool is_special_tag(FlyString const& tag_name, FlyString const& namespace_);
|
||||
static bool is_special_tag(DeprecatedFlyString const& tag_name, DeprecatedFlyString const& namespace_);
|
||||
|
||||
HTMLTokenizer& tokenizer() { return m_tokenizer; }
|
||||
|
||||
|
@ -117,9 +117,9 @@ private:
|
|||
|
||||
void stop_parsing() { m_stop_parsing = true; }
|
||||
|
||||
void generate_implied_end_tags(FlyString const& exception = {});
|
||||
void generate_implied_end_tags(DeprecatedFlyString const& exception = {});
|
||||
void generate_all_implied_end_tags_thoroughly();
|
||||
JS::NonnullGCPtr<DOM::Element> create_element_for(HTMLToken const&, FlyString const& namespace_, DOM::Node const& intended_parent);
|
||||
JS::NonnullGCPtr<DOM::Element> create_element_for(HTMLToken const&, DeprecatedFlyString const& namespace_, DOM::Node const& intended_parent);
|
||||
|
||||
struct AdjustedInsertionLocation {
|
||||
JS::GCPtr<DOM::Node> parent;
|
||||
|
@ -130,7 +130,7 @@ private:
|
|||
|
||||
DOM::Text* find_character_insertion_node();
|
||||
void flush_character_insertions();
|
||||
JS::NonnullGCPtr<DOM::Element> insert_foreign_element(HTMLToken const&, FlyString const&);
|
||||
JS::NonnullGCPtr<DOM::Element> insert_foreign_element(HTMLToken const&, DeprecatedFlyString const&);
|
||||
JS::NonnullGCPtr<DOM::Element> insert_html_element(HTMLToken const&);
|
||||
DOM::Element& current_node();
|
||||
DOM::Element& adjusted_current_node();
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Types.h>
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
return token;
|
||||
}
|
||||
|
||||
static HTMLToken make_start_tag(FlyString const& tag_name)
|
||||
static HTMLToken make_start_tag(DeprecatedFlyString const& tag_name)
|
||||
{
|
||||
HTMLToken token { Type::StartTag };
|
||||
token.set_tag_name(tag_name);
|
||||
|
@ -134,7 +134,7 @@ public:
|
|||
m_data.get<u32>() = code_point;
|
||||
}
|
||||
|
||||
FlyString const& comment() const
|
||||
DeprecatedFlyString const& comment() const
|
||||
{
|
||||
VERIFY(is_comment());
|
||||
return m_string_data;
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
m_string_data = move(comment);
|
||||
}
|
||||
|
||||
FlyString const& tag_name() const
|
||||
DeprecatedFlyString const& tag_name() const
|
||||
{
|
||||
VERIFY(is_start_tag() || is_end_tag());
|
||||
return m_string_data;
|
||||
|
@ -247,7 +247,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
StringView attribute(FlyString const& attribute_name)
|
||||
StringView attribute(DeprecatedFlyString const& attribute_name)
|
||||
{
|
||||
VERIFY(is_start_tag() || is_end_tag());
|
||||
|
||||
|
@ -261,19 +261,19 @@ public:
|
|||
return {};
|
||||
}
|
||||
|
||||
bool has_attribute(FlyString const& attribute_name)
|
||||
bool has_attribute(DeprecatedFlyString const& attribute_name)
|
||||
{
|
||||
return !attribute(attribute_name).is_null();
|
||||
}
|
||||
|
||||
void adjust_tag_name(FlyString const& old_name, FlyString const& new_name)
|
||||
void adjust_tag_name(DeprecatedFlyString const& old_name, DeprecatedFlyString const& new_name)
|
||||
{
|
||||
VERIFY(is_start_tag() || is_end_tag());
|
||||
if (old_name == tag_name())
|
||||
set_tag_name(new_name);
|
||||
}
|
||||
|
||||
void adjust_attribute_name(FlyString const& old_name, FlyString const& new_name)
|
||||
void adjust_attribute_name(DeprecatedFlyString const& old_name, DeprecatedFlyString const& new_name)
|
||||
{
|
||||
VERIFY(is_start_tag() || is_end_tag());
|
||||
for_each_attribute([&](Attribute& attribute) {
|
||||
|
@ -283,7 +283,7 @@ public:
|
|||
});
|
||||
}
|
||||
|
||||
void adjust_foreign_attribute(FlyString const& old_name, FlyString const& prefix, FlyString const& local_name, FlyString const& namespace_)
|
||||
void adjust_foreign_attribute(DeprecatedFlyString const& old_name, DeprecatedFlyString const& prefix, DeprecatedFlyString const& local_name, DeprecatedFlyString const& namespace_)
|
||||
{
|
||||
VERIFY(is_start_tag() || is_end_tag());
|
||||
for_each_attribute([&](Attribute& attribute) {
|
||||
|
@ -350,7 +350,7 @@ private:
|
|||
bool m_tag_self_closing_acknowledged { false };
|
||||
|
||||
// Type::Comment (comment data), Type::StartTag and Type::EndTag (tag name)
|
||||
FlyString m_string_data;
|
||||
DeprecatedFlyString m_string_data;
|
||||
|
||||
Variant<Empty, u32, OwnPtr<DoctypeData>, OwnPtr<Vector<Attribute>>> m_data {};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ bool ListOfActiveFormattingElements::contains(const DOM::Element& element) const
|
|||
return false;
|
||||
}
|
||||
|
||||
DOM::Element* ListOfActiveFormattingElements::last_element_with_tag_name_before_marker(FlyString const& tag_name)
|
||||
DOM::Element* ListOfActiveFormattingElements::last_element_with_tag_name_before_marker(DeprecatedFlyString const& tag_name)
|
||||
{
|
||||
for (ssize_t i = m_entries.size() - 1; i >= 0; --i) {
|
||||
auto& entry = m_entries[i];
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
Vector<Entry> const& entries() const { return m_entries; }
|
||||
Vector<Entry>& entries() { return m_entries; }
|
||||
|
||||
DOM::Element* last_element_with_tag_name_before_marker(FlyString const& tag_name);
|
||||
DOM::Element* last_element_with_tag_name_before_marker(DeprecatedFlyString const& tag_name);
|
||||
|
||||
void clear_up_to_the_last_marker();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
static Vector<FlyString> s_base_list { "applet", "caption", "html", "table", "td", "th", "marquee", "object", "template" };
|
||||
static Vector<DeprecatedFlyString> s_base_list { "applet", "caption", "html", "table", "td", "th", "marquee", "object", "template" };
|
||||
|
||||
StackOfOpenElements::~StackOfOpenElements() = default;
|
||||
|
||||
|
@ -20,7 +20,7 @@ void StackOfOpenElements::visit_edges(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(element);
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const& list) const
|
||||
bool StackOfOpenElements::has_in_scope_impl(DeprecatedFlyString const& tag_name, Vector<DeprecatedFlyString> const& list) const
|
||||
{
|
||||
for (auto const& element : m_elements.in_reverse()) {
|
||||
if (element->local_name() == tag_name)
|
||||
|
@ -31,12 +31,12 @@ bool StackOfOpenElements::has_in_scope_impl(FlyString const& tag_name, Vector<Fl
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_scope(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::has_in_scope(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
return has_in_scope_impl(tag_name, s_base_list);
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const& list) const
|
||||
bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vector<DeprecatedFlyString> const& list) const
|
||||
{
|
||||
for (auto& element : m_elements.in_reverse()) {
|
||||
if (element.ptr() == &target_node)
|
||||
|
@ -52,19 +52,19 @@ bool StackOfOpenElements::has_in_scope(const DOM::Element& target_node) const
|
|||
return has_in_scope_impl(target_node, s_base_list);
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_button_scope(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::has_in_button_scope(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
auto list = s_base_list;
|
||||
list.append("button");
|
||||
return has_in_scope_impl(tag_name, list);
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_table_scope(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::has_in_table_scope(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
return has_in_scope_impl(tag_name, { "html", "table", "template" });
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::has_in_list_item_scope(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::has_in_list_item_scope(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
auto list = s_base_list;
|
||||
list.append("ol");
|
||||
|
@ -78,7 +78,7 @@ bool StackOfOpenElements::has_in_list_item_scope(FlyString const& tag_name) cons
|
|||
// - optgroup in the HTML namespace
|
||||
// - option in the HTML namespace
|
||||
// NOTE: In this case it's "all element types _except_"
|
||||
bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::has_in_select_scope(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#has-an-element-in-the-specific-scope
|
||||
// 1. Initialize node to be the current node (the bottommost node of the stack).
|
||||
|
@ -106,7 +106,7 @@ bool StackOfOpenElements::contains(const DOM::Element& element) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool StackOfOpenElements::contains(FlyString const& tag_name) const
|
||||
bool StackOfOpenElements::contains(DeprecatedFlyString const& tag_name) const
|
||||
{
|
||||
for (auto& element_on_stack : m_elements) {
|
||||
if (element_on_stack->local_name() == tag_name)
|
||||
|
@ -115,7 +115,7 @@ bool StackOfOpenElements::contains(FlyString const& tag_name) const
|
|||
return false;
|
||||
}
|
||||
|
||||
void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(FlyString const& tag_name)
|
||||
void StackOfOpenElements::pop_until_an_element_with_tag_name_has_been_popped(DeprecatedFlyString const& tag_name)
|
||||
{
|
||||
while (m_elements.last()->local_name() != tag_name)
|
||||
(void)pop();
|
||||
|
@ -134,7 +134,7 @@ JS::GCPtr<DOM::Element> StackOfOpenElements::topmost_special_node_below(DOM::Ele
|
|||
return found_element.ptr();
|
||||
}
|
||||
|
||||
StackOfOpenElements::LastElementResult StackOfOpenElements::last_element_with_tag_name(FlyString const& tag_name)
|
||||
StackOfOpenElements::LastElementResult StackOfOpenElements::last_element_with_tag_name(DeprecatedFlyString const& tag_name)
|
||||
{
|
||||
for (ssize_t i = m_elements.size() - 1; i >= 0; --i) {
|
||||
auto& element = m_elements[i];
|
||||
|
|
|
@ -36,21 +36,21 @@ public:
|
|||
const DOM::Element& current_node() const { return *m_elements.last(); }
|
||||
DOM::Element& current_node() { return *m_elements.last(); }
|
||||
|
||||
bool has_in_scope(FlyString const& tag_name) const;
|
||||
bool has_in_button_scope(FlyString const& tag_name) const;
|
||||
bool has_in_table_scope(FlyString const& tag_name) const;
|
||||
bool has_in_list_item_scope(FlyString const& tag_name) const;
|
||||
bool has_in_select_scope(FlyString const& tag_name) const;
|
||||
bool has_in_scope(DeprecatedFlyString const& tag_name) const;
|
||||
bool has_in_button_scope(DeprecatedFlyString const& tag_name) const;
|
||||
bool has_in_table_scope(DeprecatedFlyString const& tag_name) const;
|
||||
bool has_in_list_item_scope(DeprecatedFlyString const& tag_name) const;
|
||||
bool has_in_select_scope(DeprecatedFlyString const& tag_name) const;
|
||||
|
||||
bool has_in_scope(const DOM::Element&) const;
|
||||
|
||||
bool contains(const DOM::Element&) const;
|
||||
bool contains(FlyString const& tag_name) const;
|
||||
bool contains(DeprecatedFlyString const& tag_name) const;
|
||||
|
||||
auto const& elements() const { return m_elements; }
|
||||
auto& elements() { return m_elements; }
|
||||
|
||||
void pop_until_an_element_with_tag_name_has_been_popped(FlyString const&);
|
||||
void pop_until_an_element_with_tag_name_has_been_popped(DeprecatedFlyString const&);
|
||||
|
||||
JS::GCPtr<DOM::Element> topmost_special_node_below(DOM::Element const&);
|
||||
|
||||
|
@ -58,14 +58,14 @@ public:
|
|||
JS::GCPtr<DOM::Element> element;
|
||||
ssize_t index;
|
||||
};
|
||||
LastElementResult last_element_with_tag_name(FlyString const&);
|
||||
LastElementResult last_element_with_tag_name(DeprecatedFlyString const&);
|
||||
JS::GCPtr<DOM::Element> element_immediately_above(DOM::Element const&);
|
||||
|
||||
void visit_edges(JS::Cell::Visitor&);
|
||||
|
||||
private:
|
||||
bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&) const;
|
||||
bool has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const&) const;
|
||||
bool has_in_scope_impl(DeprecatedFlyString const& tag_name, Vector<DeprecatedFlyString> const&) const;
|
||||
bool has_in_scope_impl(const DOM::Element& target_node, Vector<DeprecatedFlyString> const&) const;
|
||||
|
||||
Vector<JS::NonnullGCPtr<DOM::Element>> m_elements;
|
||||
};
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
PromiseRejectionEvent* PromiseRejectionEvent::create(JS::Realm& realm, FlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
PromiseRejectionEvent* PromiseRejectionEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<PromiseRejectionEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
PromiseRejectionEvent* PromiseRejectionEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
PromiseRejectionEvent* PromiseRejectionEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
PromiseRejectionEvent::PromiseRejectionEvent(JS::Realm& realm, FlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
PromiseRejectionEvent::PromiseRejectionEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name, event_init)
|
||||
, m_promise(const_cast<JS::Promise*>(event_init.promise.cell()))
|
||||
, m_reason(event_init.reason)
|
||||
|
|
|
@ -23,8 +23,8 @@ class PromiseRejectionEvent final : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(PromiseRejectionEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static PromiseRejectionEvent* create(JS::Realm&, FlyString const& event_name, PromiseRejectionEventInit const& event_init = {});
|
||||
static PromiseRejectionEvent* construct_impl(JS::Realm&, FlyString const& event_name, PromiseRejectionEventInit const& event_init);
|
||||
static PromiseRejectionEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init = {});
|
||||
static PromiseRejectionEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init);
|
||||
|
||||
virtual ~PromiseRejectionEvent() override;
|
||||
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
JS::Value reason() const { return m_reason; }
|
||||
|
||||
private:
|
||||
PromiseRejectionEvent(JS::Realm&, FlyString const& event_name, PromiseRejectionEventInit const& event_init);
|
||||
PromiseRejectionEvent(JS::Realm&, DeprecatedFlyString const& event_name, PromiseRejectionEventInit const& event_init);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
SubmitEvent* SubmitEvent::create(JS::Realm& realm, FlyString const& event_name, SubmitEventInit const& event_init)
|
||||
SubmitEvent* SubmitEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<SubmitEvent>(realm, realm, event_name, event_init);
|
||||
}
|
||||
|
||||
SubmitEvent* SubmitEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, SubmitEventInit const& event_init)
|
||||
SubmitEvent* SubmitEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init)
|
||||
{
|
||||
return create(realm, event_name, event_init);
|
||||
}
|
||||
|
||||
SubmitEvent::SubmitEvent(JS::Realm& realm, FlyString const& event_name, SubmitEventInit const& event_init)
|
||||
SubmitEvent::SubmitEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init)
|
||||
: DOM::Event(realm, event_name, event_init)
|
||||
, m_submitter(event_init.submitter)
|
||||
{
|
||||
|
|
|
@ -19,15 +19,15 @@ class SubmitEvent final : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(SubmitEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static SubmitEvent* create(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
|
||||
static SubmitEvent* construct_impl(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
|
||||
static SubmitEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init);
|
||||
static SubmitEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init);
|
||||
|
||||
virtual ~SubmitEvent() override;
|
||||
|
||||
JS::GCPtr<HTMLElement> submitter() const { return m_submitter; }
|
||||
|
||||
private:
|
||||
SubmitEvent(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
|
||||
SubmitEvent(JS::Realm&, DeprecatedFlyString const& event_name, SubmitEventInit const& event_init);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace Web::HTML::TagNames {
|
||||
|
||||
#define __ENUMERATE_HTML_TAG(name) FlyString name;
|
||||
#define __ENUMERATE_HTML_TAG(name) DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_TAGS
|
||||
#undef __ENUMERATE_HTML_TAG
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
|
||||
namespace Web::HTML::TagNames {
|
||||
|
||||
|
@ -152,7 +152,7 @@ namespace Web::HTML::TagNames {
|
|||
__ENUMERATE_HTML_TAG(wbr) \
|
||||
__ENUMERATE_HTML_TAG(xmp)
|
||||
|
||||
#define __ENUMERATE_HTML_TAG(name) extern FlyString name;
|
||||
#define __ENUMERATE_HTML_TAG(name) extern DeprecatedFlyString name;
|
||||
ENUMERATE_HTML_TAGS
|
||||
#undef __ENUMERATE_HTML_TAG
|
||||
|
||||
|
|
|
@ -780,7 +780,7 @@ float Window::scroll_y() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#fire-a-page-transition-event
|
||||
void Window::fire_a_page_transition_event(FlyString const& event_name, bool persisted)
|
||||
void Window::fire_a_page_transition_event(DeprecatedFlyString const& event_name, bool persisted)
|
||||
{
|
||||
// To fire a page transition event named eventName at a Window window with a boolean persisted,
|
||||
// fire an event named eventName at window, using PageTransitionEvent,
|
||||
|
|
|
@ -102,7 +102,7 @@ public:
|
|||
float scroll_x() const;
|
||||
float scroll_y() const;
|
||||
|
||||
void fire_a_page_transition_event(FlyString const& event_name, bool persisted);
|
||||
void fire_a_page_transition_event(DeprecatedFlyString const& event_name, bool persisted);
|
||||
|
||||
float device_pixel_ratio() const;
|
||||
|
||||
|
@ -142,7 +142,7 @@ private:
|
|||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
// ^HTML::GlobalEventHandlers
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(FlyString const&) override { return *this; }
|
||||
virtual DOM::EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const&) override { return *this; }
|
||||
|
||||
// ^HTML::WindowEventHandlers
|
||||
virtual DOM::EventTarget& window_event_handlers_to_event_target() override { return *this; }
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
namespace Web::HTML {
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-worker-interface
|
||||
Worker::Worker(FlyString const& script_url, WorkerOptions const options, DOM::Document& document)
|
||||
Worker::Worker(DeprecatedFlyString const& script_url, WorkerOptions const options, DOM::Document& document)
|
||||
: DOM::EventTarget(document.realm())
|
||||
, m_script_url(script_url)
|
||||
, m_options(options)
|
||||
|
@ -40,7 +40,7 @@ void Worker::visit_edges(Cell::Visitor& visitor)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#dom-worker
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> Worker::create(FlyString const& script_url, WorkerOptions const options, DOM::Document& document)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> Worker::create(DeprecatedFlyString const& script_url, WorkerOptions const options, DOM::Document& document)
|
||||
{
|
||||
dbgln_if(WEB_WORKER_DEBUG, "WebWorker: Creating worker with script_url = {}", script_url);
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ class Worker : public DOM::EventTarget {
|
|||
WEB_PLATFORM_OBJECT(Worker, DOM::EventTarget);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> create(FlyString const& script_url, WorkerOptions const options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> construct_impl(JS::Realm& realm, FlyString const& script_url, WorkerOptions const options)
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> create(DeprecatedFlyString const& script_url, WorkerOptions const options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Worker>> construct_impl(JS::Realm& realm, DeprecatedFlyString const& script_url, WorkerOptions const options)
|
||||
{
|
||||
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
||||
return Worker::create(script_url, options, window.associated_document());
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
#undef __ENUMERATE
|
||||
|
||||
protected:
|
||||
Worker(FlyString const&, const WorkerOptions, DOM::Document&);
|
||||
Worker(DeprecatedFlyString const&, const WorkerOptions, DOM::Document&);
|
||||
|
||||
private:
|
||||
static HTML::EventLoop& get_vm_event_loop(JS::VM& target_vm)
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
FlyString m_script_url;
|
||||
DeprecatedFlyString m_script_url;
|
||||
WorkerOptions m_options;
|
||||
|
||||
JS::GCPtr<DOM::Document> m_document;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue