diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
index e8b878f4c8..73eed82b27 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
@@ -97,6 +97,8 @@ void HTMLMediaElement::parse_attribute(DeprecatedFlyString const& name, Deprecat
void HTMLMediaElement::did_remove_attribute(DeprecatedFlyString const& name)
{
+ Base::did_remove_attribute(name);
+
if (name == HTML::AttributeNames::crossorigin)
m_crossorigin = cors_setting_attribute_from_keyword({});
}
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h
index 6d06d98250..c5af05622c 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.h
@@ -81,6 +81,9 @@ 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 did_remove_attribute(DeprecatedFlyString const&) override;
+
// Override in subclasses to handle implementation-specific behavior when the element state changes
// to playing or paused, e.g. to start/stop play timers.
virtual void on_playing() { }
@@ -94,9 +97,6 @@ private:
struct EntireResource { };
using ByteRange = Variant; // FIXME: This will need to include "until end" and an actual byte range.
- virtual void parse_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
- virtual void did_remove_attribute(DeprecatedFlyString const&) override;
-
Task::Source media_element_event_task_source() const { return m_media_element_event_task_source.source; }
WebIDL::ExceptionOr load_element();