ladybird/Userland/Libraries/LibWeb/HTML/HTMLModElement.cpp
Timothy Flynn f3db548a3d 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.
2023-01-09 23:00:24 +00:00

32 lines
857 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Assertions.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/HTML/HTMLModElement.h>
namespace Web::HTML {
HTMLModElement::HTMLModElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{
set_prototype(&Bindings::cached_web_prototype(realm(), "HTMLModElement"));
}
HTMLModElement::~HTMLModElement() = default;
DeprecatedFlyString HTMLModElement::default_role() const
{
// https://www.w3.org/TR/html-aria/#el-del
if (local_name() == TagNames::del)
return DOM::ARIARoleNames::deletion;
// https://www.w3.org/TR/html-aria/#el-ins
if (local_name() == TagNames::ins)
return DOM::ARIARoleNames::insertion;
VERIFY_NOT_REACHED();
}
}