From 5a74486b59eeb29bf16af5c067f4b599674264c8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 3 Jul 2023 17:08:37 +0200 Subject: [PATCH] LibWeb: Rename DOM::Element::parse_attribute() => attribute_changed() This is a first step towards merging attribute change and removal notifications into a single function. --- Userland/Libraries/LibWeb/DOM/Element.cpp | 6 +++--- Userland/Libraries/LibWeb/DOM/Element.h | 2 +- Userland/Libraries/LibWeb/DOM/EventTarget.cpp | 2 +- Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLBaseElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLImageElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLInputElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLOptionElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLOptionElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h | 2 +- Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp | 4 ++-- Userland/Libraries/LibWeb/HTML/HTMLVideoElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGCircleElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGEllipseElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGEllipseElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGGradientElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGGradientElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGLineElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGLineElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGPathElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGPolygonElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGPolylineElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGRectElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGSVGElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGStopElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGStopElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGTextContentElement.cpp | 4 ++-- Userland/Libraries/LibWeb/SVG/SVGTextContentElement.h | 2 +- Userland/Libraries/LibWeb/SVG/SVGUseElement.cpp | 6 +++--- Userland/Libraries/LibWeb/SVG/SVGUseElement.h | 2 +- 65 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index aa2b4b6edc..1662b2bbf0 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -145,7 +145,7 @@ WebIDL::ExceptionOr Element::set_attribute(DeprecatedFlyString const& name attribute->set_value(value); } - parse_attribute(attribute->local_name(), value); + attribute_changed(attribute->local_name(), value); if (value != old_value) { invalidate_style_after_attribute_change(name); @@ -261,7 +261,7 @@ WebIDL::ExceptionOr Element::toggle_attribute(DeprecatedFlyString const& n auto new_attribute = TRY(Attr::create(document(), insert_as_lowercase ? name.to_lowercase() : name, "")); m_attributes->append_attribute(new_attribute); - parse_attribute(new_attribute->local_name(), ""); + attribute_changed(new_attribute->local_name(), ""); invalidate_style_after_attribute_change(name); @@ -361,7 +361,7 @@ CSS::CSSStyleDeclaration const* Element::inline_style() const return m_inline_style.ptr(); } -void Element::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void Element::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { if (name == HTML::AttributeNames::class_) { auto new_classes = value.split_view(Infra::is_ascii_whitespace); diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index d3cdeb6c76..6b2daff957 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -121,7 +121,7 @@ public: Vector const& class_names() const { return m_classes; } virtual void apply_presentational_hints(CSS::StyleProperties&) const { } - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value); + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value); virtual void did_remove_attribute(DeprecatedFlyString const&); struct [[nodiscard]] RequiredInvalidationAfterStyleChange { diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp index 06d345687a..5dc15d7b7b 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp @@ -703,7 +703,7 @@ JS::ThrowCompletionOr EventTarget::process_event_handler_for_event(FlyStri // https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-attributes:concept-element-attributes-change-ext void EventTarget::element_event_handler_attribute_changed(FlyString const& local_name, Optional const& value) { - // NOTE: Step 1 of this algorithm was handled in HTMLElement::parse_attribute. + // NOTE: Step 1 of this algorithm was handled in HTMLElement::attribute_changed. // 2. Let eventTarget be the result of determining the target of an event handler given element and localName. // NOTE: element is `this`. diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp index 88085f7b57..4a51e978d6 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp @@ -29,9 +29,9 @@ JS::ThrowCompletionOr HTMLAnchorElement::initialize(JS::Realm& realm) return {}; } -void HTMLAnchorElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLAnchorElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::href) { set_the_url(); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h index a5f9218eab..99d61fe242 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h @@ -43,7 +43,7 @@ private: void run_activation_behavior(Web::DOM::Event const&); // ^DOM::Element - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual i32 default_tab_index_value() const override; // ^HTML::HTMLHyperlinkElementUtils diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp index 9558343d21..97c0257340 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp @@ -25,9 +25,9 @@ JS::ThrowCompletionOr HTMLAreaElement::initialize(JS::Realm& realm) return {}; } -void HTMLAreaElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLAreaElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::href) { set_the_url(); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h index 9fb7a7a50a..af0b3690c1 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h @@ -26,7 +26,7 @@ private: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; // ^DOM::Element - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual i32 default_tab_index_value() const override; // ^HTML::HTMLHyperlinkElementUtils diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp index 526cd07313..2fc849fa71 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.cpp @@ -45,9 +45,9 @@ void HTMLBaseElement::removed_from(Node* parent) document().update_base_element({}); } -void HTMLBaseElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLBaseElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); // The frozen base URL must be immediately set for an element whenever any of the following situations occur: // - The base element is the first base element in tree order with an href content attribute in its Document, and its href content attribute is changed. diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.h b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.h index b645574883..35cf7960b3 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLBaseElement.h @@ -23,7 +23,7 @@ public: virtual void inserted() override; virtual void removed_from(Node*) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; private: HTMLBaseElement(DOM::Document&, DOM::QualifiedName); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp index 83eb2b6c71..35e20b5581 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.cpp @@ -50,9 +50,9 @@ void HTMLBodyElement::apply_presentational_hints(CSS::StyleProperties& style) co }); } -void HTMLBodyElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLBodyElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name.equals_ignoring_ascii_case("link"sv)) { // https://html.spec.whatwg.org/multipage/rendering.html#the-page:rules-for-parsing-a-legacy-colour-value-3 auto color = parse_legacy_color_value(value); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h index e3ac1836ed..1f515e4882 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h @@ -20,7 +20,7 @@ class HTMLBodyElement final public: virtual ~HTMLBodyElement() override; - virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override; + virtual void attribute_changed(DeprecatedFlyString const&, DeprecatedString const&) override; virtual void apply_presentational_hints(CSS::StyleProperties&) const override; // https://www.w3.org/TR/html-aria/#el-body diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp index 120ce68b33..b5ed7767bb 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp @@ -228,9 +228,9 @@ bool HTMLElement::cannot_navigate() const return !is(this) && !is_connected(); } -void HTMLElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Element::parse_attribute(name, value); + Element::attribute_changed(name, value); if (name == HTML::AttributeNames::contenteditable) { if ((!value.is_null() && value.is_empty()) || value.equals_ignoring_ascii_case("true"sv)) { diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.h b/Userland/Libraries/LibWeb/HTML/HTMLElement.h index 5d21e18cd6..7964c1bae2 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.h @@ -70,7 +70,7 @@ protected: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void did_remove_attribute(DeprecatedFlyString const& name) override; virtual void visit_edges(Cell::Visitor&) override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp index 8eb75aeb00..8e793577e0 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.cpp @@ -25,9 +25,9 @@ JS::ThrowCompletionOr HTMLFrameSetElement::initialize(JS::Realm& realm) return {}; } -void HTMLFrameSetElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLFrameSetElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); #undef __ENUMERATE #define __ENUMERATE(attribute_name, event_name) \ diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.h b/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.h index 07da683826..badb7addb7 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLFrameSetElement.h @@ -24,7 +24,7 @@ private: HTMLFrameSetElement(DOM::Document&, DOM::QualifiedName); virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override; + virtual void attribute_changed(DeprecatedFlyString const&, DeprecatedString const&) override; // ^HTML::GlobalEventHandlers virtual EventTarget& global_event_handlers_to_event_target(FlyString const& event_name) override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index 6d35666449..0fe0c22c66 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -34,9 +34,9 @@ JS::GCPtr HTMLIFrameElement::create_layout_node(NonnullRefPtr(document(), *this, move(style)); } -void HTMLIFrameElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLIFrameElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::src) load_src(value); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h index 2834da5c4f..88dbb5c8ee 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.h @@ -33,7 +33,7 @@ private: // ^DOM::Element virtual void inserted() override; virtual void removed_from(Node*) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(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 diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp index b04637939a..05fe1408e7 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -75,9 +75,9 @@ void HTMLImageElement::apply_presentational_hints(CSS::StyleProperties& style) c }); } -void HTMLImageElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLImageElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::crossorigin) { m_cors_setting = cors_setting_attribute_from_keyword(String::from_deprecated_string(value).release_value_but_fixme_should_propagate_errors()); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h index 3ee78d53d3..22cb06ac80 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.h @@ -28,7 +28,7 @@ class HTMLImageElement final public: virtual ~HTMLImageElement() override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void did_remove_attribute(DeprecatedFlyString const& name) override; DeprecatedString alt() const { return attribute(HTML::AttributeNames::alt); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 5515d2368b..60f0e64aae 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -493,9 +493,9 @@ void HTMLInputElement::did_lose_focus() }); } -void HTMLInputElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLInputElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::checked) { // When the checked content attribute is added, if the control does not have dirty checkedness, // the user agent must set the checkedness of the element to true diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h index 818c684e9c..32bb601bce 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h @@ -104,7 +104,7 @@ public: virtual bool is_focusable() const override { return m_type != TypeAttributeState::Hidden; } // ^HTMLElement - virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override; + virtual void attribute_changed(DeprecatedFlyString const&, DeprecatedString const&) override; virtual void did_remove_attribute(DeprecatedFlyString const&) override; // ^FormAssociatedElement diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index e9b3a241cd..bab284d995 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -77,9 +77,9 @@ bool HTMLLinkElement::has_loaded_icon() const return m_relationship & Relationship::Icon && resource() && resource()->is_loaded() && resource()->has_encoded_data(); } -void HTMLLinkElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLLinkElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); // 4.6.7 Link types - https://html.spec.whatwg.org/multipage/links.html#linkTypes if (name == HTML::AttributeNames::rel) { diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h index d779292506..9f42f3432e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -39,7 +39,7 @@ private: HTMLLinkElement(DOM::Document&, DOM::QualifiedName); virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override; + void attribute_changed(DeprecatedFlyString const&, DeprecatedString const&) override; // ^ResourceClient virtual void resource_did_fail() override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index eb6c2414d9..93f1e36086 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -84,9 +84,9 @@ void HTMLMediaElement::visit_edges(Cell::Visitor& visitor) visitor.visit(m_fetch_controller); } -void HTMLMediaElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLMediaElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Base::parse_attribute(name, value); + Base::attribute_changed(name, value); if (name == HTML::AttributeNames::src) load_element().release_value_but_fixme_should_propagate_errors(); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h index 044d254f94..b5fe74636a 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h @@ -124,7 +124,7 @@ protected: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void did_remove_attribute(DeprecatedFlyString const&) override; virtual void removed_from(DOM::Node*) override; virtual void children_changed() override; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index b4130572f3..80806b4241 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -41,9 +41,9 @@ JS::ThrowCompletionOr HTMLObjectElement::initialize(JS::Realm& realm) return {}; } -void HTMLObjectElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLObjectElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - NavigableContainer::parse_attribute(name, value); + NavigableContainer::attribute_changed(name, value); // https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element // Whenever one of the following conditions occur: diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h index 108c54a2ee..fe60aad43f 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.h @@ -34,7 +34,7 @@ class HTMLObjectElement final public: virtual ~HTMLObjectElement() override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; DeprecatedString data() const; void set_data(DeprecatedString const& data) { MUST(set_attribute(HTML::AttributeNames::data, data)); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.cpp index f28c4549bd..2c6c8d3d03 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.cpp @@ -33,9 +33,9 @@ JS::ThrowCompletionOr HTMLOptionElement::initialize(JS::Realm& realm) return {}; } -void HTMLOptionElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLOptionElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - HTMLElement::parse_attribute(name, value); + HTMLElement::attribute_changed(name, value); if (name == HTML::AttributeNames::selected) { // Except where otherwise specified, when the element is created, its selectedness must be set to true diff --git a/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.h b/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.h index 4226129a3c..402caeb84b 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLOptionElement.h @@ -40,7 +40,7 @@ private: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; - void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; void did_remove_attribute(DeprecatedFlyString const& name) override; void ask_for_a_reset(); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index a19fda86e3..ce978ecd5e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -47,9 +47,9 @@ void HTMLScriptElement::visit_edges(Cell::Visitor& visitor) visitor.visit(m_preparation_time_document.ptr()); } -void HTMLScriptElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLScriptElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Base::parse_attribute(name, value); + Base::attribute_changed(name, value); if (name == HTML::AttributeNames::crossorigin) m_crossorigin = cors_setting_attribute_from_keyword(String::from_deprecated_string(value).release_value_but_fixme_should_propagate_errors()); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h index 3ad4359ebe..49a74be78b 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h @@ -62,7 +62,7 @@ private: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void did_remove_attribute(DeprecatedFlyString const&) override; // https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element diff --git a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp index de993d6915..1c2e9a018f 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp @@ -42,9 +42,9 @@ void HTMLVideoElement::visit_edges(Cell::Visitor& visitor) visitor.visit(m_fetch_controller); } -void HTMLVideoElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void HTMLVideoElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Base::parse_attribute(name, value); + Base::attribute_changed(name, value); if (name == HTML::AttributeNames::poster) determine_element_poster_frame(value).release_value_but_fixme_should_propagate_errors(); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.h b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.h index d6a9955969..ae676b8f0c 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.h @@ -47,7 +47,7 @@ private: virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void did_remove_attribute(DeprecatedFlyString const&) override; virtual JS::GCPtr create_layout_node(NonnullRefPtr) override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp index efb0a645e3..a99c48878e 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.cpp @@ -24,9 +24,9 @@ JS::ThrowCompletionOr SVGCircleElement::initialize(JS::Realm& realm) return {}; } -void SVGCircleElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGCircleElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::cx) { m_center_x = AttributeParser::parse_coordinate(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.h b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.h index d22c679aa2..f916cbd1f8 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGCircleElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGCircleElement.h @@ -17,7 +17,7 @@ class SVGCircleElement final : public SVGGeometryElement { public: virtual ~SVGCircleElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGElement.cpp index a09e81c0af..3b982aea48 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGElement.cpp @@ -37,9 +37,9 @@ void SVGElement::visit_edges(Cell::Visitor& visitor) visitor.visit(m_dataset); } -void SVGElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Base::parse_attribute(name, value); + Base::attribute_changed(name, value); update_use_elements_that_reference_this(); } diff --git a/Userland/Libraries/LibWeb/SVG/SVGElement.h b/Userland/Libraries/LibWeb/SVG/SVGElement.h index 93fd507634..8ee802fed1 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGElement.h @@ -16,7 +16,7 @@ class SVGElement : public DOM::Element { public: virtual bool requires_svg_container() const override { return true; } - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void children_changed() override; virtual void inserted() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.cpp index 0bb5a9f453..1d12d02dd1 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.cpp @@ -24,9 +24,9 @@ JS::ThrowCompletionOr SVGEllipseElement::initialize(JS::Realm& realm) return {}; } -void SVGEllipseElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGEllipseElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::cx) { m_center_x = AttributeParser::parse_coordinate(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.h b/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.h index a05665c37e..d6fd22741a 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGEllipseElement.h @@ -17,7 +17,7 @@ class SVGEllipseElement final : public SVGGeometryElement { public: virtual ~SVGEllipseElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGGradientElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGradientElement.cpp index 8c57b6739a..f0415385b7 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGradientElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGGradientElement.cpp @@ -17,9 +17,9 @@ SVGGradientElement::SVGGradientElement(DOM::Document& document, DOM::QualifiedNa { } -void SVGGradientElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGGradientElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGElement::parse_attribute(name, value); + SVGElement::attribute_changed(name, value); if (name == AttributeNames::gradientUnits) { m_gradient_units = AttributeParser::parse_gradient_units(value); } else if (name == AttributeNames::gradientTransform) { diff --git a/Userland/Libraries/LibWeb/SVG/SVGGradientElement.h b/Userland/Libraries/LibWeb/SVG/SVGGradientElement.h index 3d98e0a9fd..04ce1a697a 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGradientElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGGradientElement.h @@ -26,7 +26,7 @@ class SVGGradientElement : public SVGElement { public: virtual ~SVGGradientElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Optional to_gfx_paint_style(SVGPaintContext const&) const = 0; diff --git a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp index de6121e831..41d54983d5 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp @@ -32,9 +32,9 @@ JS::ThrowCompletionOr SVGGraphicsElement::initialize(JS::Realm& realm) return {}; } -void SVGGraphicsElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGGraphicsElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGElement::parse_attribute(name, value); + SVGElement::attribute_changed(name, value); if (name == "transform"sv) { auto transform_list = AttributeParser::parse_transform(value); if (transform_list.has_value()) diff --git a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h index 8757a13bbc..68931c938e 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h @@ -24,7 +24,7 @@ class SVGGraphicsElement : public SVGElement { public: virtual void apply_presentational_hints(CSS::StyleProperties&) const override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; Optional fill_color() const; Optional fill_rule() const; diff --git a/Userland/Libraries/LibWeb/SVG/SVGLineElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGLineElement.cpp index 8fa06e4799..4d4912f88f 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGLineElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGLineElement.cpp @@ -24,9 +24,9 @@ JS::ThrowCompletionOr SVGLineElement::initialize(JS::Realm& realm) return {}; } -void SVGLineElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGLineElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::x1) { m_x1 = AttributeParser::parse_coordinate(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGLineElement.h b/Userland/Libraries/LibWeb/SVG/SVGLineElement.h index e2865c1c1f..9b7606283c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGLineElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGLineElement.h @@ -17,7 +17,7 @@ class SVGLineElement final : public SVGGeometryElement { public: virtual ~SVGLineElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp index 45b8c19d45..8a70d0c5b9 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp @@ -26,9 +26,9 @@ JS::ThrowCompletionOr SVGLinearGradientElement::initialize(JS::Realm& real return {}; } -void SVGLinearGradientElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGLinearGradientElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGradientElement::parse_attribute(name, value); + SVGGradientElement::attribute_changed(name, value); // FIXME: Should allow for ` | ` for x1, x2, y1, y2 if (name == SVG::AttributeNames::x1) { diff --git a/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.h b/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.h index e9e5cc8047..405a819fcf 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGLinearGradientElement.h @@ -18,7 +18,7 @@ class SVGLinearGradientElement : public SVGGradientElement { public: virtual ~SVGLinearGradientElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Optional to_gfx_paint_style(SVGPaintContext const&) const override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp index a9c66f9e37..7cbdd8e780 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -97,9 +97,9 @@ JS::ThrowCompletionOr SVGPathElement::initialize(JS::Realm& realm) return {}; } -void SVGPathElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGPathElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == "d") { m_instructions = AttributeParser::parse_path_data(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.h b/Userland/Libraries/LibWeb/SVG/SVGPathElement.h index b6b61f502b..946c80f859 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.h @@ -19,7 +19,7 @@ class SVGPathElement final : public SVGGeometryElement { public: virtual ~SVGPathElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.cpp index 0602454970..e21937b086 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.cpp @@ -24,9 +24,9 @@ JS::ThrowCompletionOr SVGPolygonElement::initialize(JS::Realm& realm) return {}; } -void SVGPolygonElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGPolygonElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::points) { m_points = AttributeParser::parse_points(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h b/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h index 3a3c7f8dba..9ac39e3e71 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGPolygonElement.h @@ -16,7 +16,7 @@ class SVGPolygonElement final : public SVGGeometryElement { public: virtual ~SVGPolygonElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.cpp index 83ccb98e27..078668ef33 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.cpp @@ -24,9 +24,9 @@ JS::ThrowCompletionOr SVGPolylineElement::initialize(JS::Realm& realm) return {}; } -void SVGPolylineElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGPolylineElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::points) { m_points = AttributeParser::parse_points(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h b/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h index c21121f3cb..110258ac97 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGPolylineElement.h @@ -16,7 +16,7 @@ class SVGPolylineElement final : public SVGGeometryElement { public: virtual ~SVGPolylineElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.cpp index 51a0c58b8f..dbabe3390a 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.cpp @@ -23,9 +23,9 @@ JS::ThrowCompletionOr SVGRadialGradientElement::initialize(JS::Realm& real return {}; } -void SVGRadialGradientElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGRadialGradientElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGradientElement::parse_attribute(name, value); + SVGGradientElement::attribute_changed(name, value); // FIXME: These are or in the spec, but all examples seem to allow percentages // and unitless values. diff --git a/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.h b/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.h index da0dfe888e..741d2c8493 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGRadialGradientElement.h @@ -18,7 +18,7 @@ class SVGRadialGradientElement : public SVGGradientElement { public: virtual ~SVGRadialGradientElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Optional to_gfx_paint_style(SVGPaintContext const&) const override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp index 005a4325c1..0164d024d7 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGRectElement.cpp @@ -26,9 +26,9 @@ JS::ThrowCompletionOr SVGRectElement::initialize(JS::Realm& realm) return {}; } -void SVGRectElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGRectElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGeometryElement::parse_attribute(name, value); + SVGGeometryElement::attribute_changed(name, value); if (name == SVG::AttributeNames::x) { m_x = AttributeParser::parse_coordinate(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGRectElement.h b/Userland/Libraries/LibWeb/SVG/SVGRectElement.h index 90e228a74e..e73f97aab5 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGRectElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGRectElement.h @@ -17,7 +17,7 @@ class SVGRectElement final : public SVGGeometryElement { public: virtual ~SVGRectElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual Gfx::Path& get_path() override; diff --git a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp index 76ff94e624..bd1c5a0740 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp @@ -70,9 +70,9 @@ void SVGSVGElement::apply_presentational_hints(CSS::StyleProperties& style) cons } } -void SVGSVGElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGSVGElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGraphicsElement::parse_attribute(name, value); + SVGGraphicsElement::attribute_changed(name, value); if (name.equals_ignoring_ascii_case(SVG::AttributeNames::viewBox)) m_view_box = try_parse_view_box(value); diff --git a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.h b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.h index 12e96c1929..3adae32d7c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.h @@ -36,7 +36,7 @@ private: virtual bool is_svg_svg_element() const override { return true; } - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; void update_fallback_view_box_for_svg_as_image(); diff --git a/Userland/Libraries/LibWeb/SVG/SVGStopElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGStopElement.cpp index 3f8447f479..0b6a3e4f0b 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGStopElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGStopElement.cpp @@ -19,9 +19,9 @@ SVGStopElement::SVGStopElement(DOM::Document& document, DOM::QualifiedName quali { } -void SVGStopElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGStopElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGElement::parse_attribute(name, value); + SVGElement::attribute_changed(name, value); if (name == SVG::AttributeNames::offset) { m_offset = AttributeParser::parse_number_percentage(value); } diff --git a/Userland/Libraries/LibWeb/SVG/SVGStopElement.h b/Userland/Libraries/LibWeb/SVG/SVGStopElement.h index bfd9e24d33..fa5acb3b35 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGStopElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGStopElement.h @@ -19,7 +19,7 @@ class SVGStopElement final : public SVGElement { public: virtual ~SVGStopElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; JS::NonnullGCPtr offset() const; diff --git a/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.cpp index cc8bc123df..6e8ad65ac6 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.cpp @@ -30,9 +30,9 @@ JS::ThrowCompletionOr SVGTextContentElement::initialize(JS::Realm& realm) return {}; } -void SVGTextContentElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGTextContentElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - SVGGraphicsElement::parse_attribute(name, value); + SVGGraphicsElement::attribute_changed(name, value); if (name == SVG::AttributeNames::x) { m_x = AttributeParser::parse_coordinate(value).value_or(m_x); diff --git a/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.h b/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.h index e7fe940f7c..2fd4e4c501 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGTextContentElement.h @@ -18,7 +18,7 @@ class SVGTextContentElement : public SVGGraphicsElement { public: virtual JS::GCPtr create_layout_node(NonnullRefPtr) override; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; WebIDL::ExceptionOr get_number_of_chars() const; diff --git a/Userland/Libraries/LibWeb/SVG/SVGUseElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGUseElement.cpp index fcad33e765..556baf0f84 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGUseElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGUseElement.cpp @@ -46,9 +46,9 @@ void SVGUseElement::visit_edges(Cell::Visitor& visitor) visitor.visit(m_document_observer); } -void SVGUseElement::parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) +void SVGUseElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) { - Base::parse_attribute(name, value); + Base::attribute_changed(name, value); // https://svgwg.org/svg2-draft/struct.html#UseLayout if (name == SVG::AttributeNames::x) { @@ -87,7 +87,7 @@ void SVGUseElement::svg_element_changed(SVGElement& svg_element) return; } - // NOTE: We need to check the ancestor because parse_attribute of a child doesn't call children_changed on the parent(s) + // NOTE: We need to check the ancestor because attribute_changed of a child doesn't call children_changed on the parent(s) if (to_clone == &svg_element || to_clone->is_ancestor_of(svg_element)) { clone_element_tree_as_our_shadow_tree(to_clone); } diff --git a/Userland/Libraries/LibWeb/SVG/SVGUseElement.h b/Userland/Libraries/LibWeb/SVG/SVGUseElement.h index f7affafc19..f85b21208c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGUseElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGUseElement.h @@ -19,7 +19,7 @@ class SVGUseElement final : public SVGGraphicsElement { public: virtual ~SVGUseElement() override = default; - virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override; + virtual void attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value) override; virtual void inserted() override;