1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibWeb: Rename Element::tag_name() => local_name()

To prepare for fully qualified tag names, let's call this local_name.
Note that we still keep an Element::tag_name() around since that's what
the JS bindings end up calling into for the Element.tagName property.
This commit is contained in:
Andreas Kling 2020-07-23 18:18:13 +02:00
parent 9d4cd565e3
commit 3cb50a4714
34 changed files with 140 additions and 137 deletions

View file

@ -116,7 +116,7 @@ RefPtr<LayoutNode> Element::create_layout_node(const StyleProperties* parent_sty
if (display == CSS::Display::None)
return nullptr;
if (tag_name() == "noscript" && document().is_scripting_enabled())
if (local_name() == "noscript" && document().is_scripting_enabled())
return nullptr;
if (display == CSS::Display::Block)
@ -271,13 +271,13 @@ String Element::inner_html() const
for (auto* child = node.first_child(); child; child = child->next_sibling()) {
if (child->is_element()) {
builder.append('<');
builder.append(to<Element>(*child).tag_name());
builder.append(to<Element>(*child).local_name());
builder.append('>');
recurse(*child);
builder.append("</");
builder.append(to<Element>(*child).tag_name());
builder.append(to<Element>(*child).local_name());
builder.append('>');
}
if (child->is_text()) {