mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb: Factor out HTMLOrSVGElement
This is a mixin in the IDL, so let's treat it as a mixin in our code and let both SVGElement and MathMLElement reuse the implementations that we wrote for HTMLElement.
This commit is contained in:
parent
d9124c8058
commit
5f84c2c3af
Notes:
github-actions[bot]
2024-10-31 09:47:30 +00:00
Author: https://github.com/gmta
Commit: 5f84c2c3af
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2036
Reviewed-by: https://github.com/tcl3
14 changed files with 130 additions and 117 deletions
|
@ -26,13 +26,6 @@ void MathMLElement::initialize(JS::Realm& realm)
|
|||
WEB_SET_PROTOTYPE_FOR_INTERFACE(MathMLElement);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<HTML::DOMStringMap> MathMLElement::dataset()
|
||||
{
|
||||
if (!m_dataset)
|
||||
m_dataset = HTML::DOMStringMap::create(*this);
|
||||
return *m_dataset;
|
||||
}
|
||||
|
||||
Optional<ARIA::Role> MathMLElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-math
|
||||
|
@ -41,20 +34,10 @@ Optional<ARIA::Role> MathMLElement::default_role() const
|
|||
return {};
|
||||
}
|
||||
|
||||
void MathMLElement::focus()
|
||||
{
|
||||
dbgln("(STUBBED) MathMLElement::focus()");
|
||||
}
|
||||
|
||||
void MathMLElement::blur()
|
||||
{
|
||||
dbgln("(STUBBED) MathMLElement::blur()");
|
||||
}
|
||||
|
||||
void MathMLElement::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_dataset);
|
||||
HTMLOrSVGElement::visit_edges(visitor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue