mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibWeb: Simplify Layout::Node::class_name() with RTTI
This commit is contained in:
parent
7841528cd4
commit
730af2c524
24 changed files with 8 additions and 37 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
@ -296,4 +297,9 @@ bool Node::is_root_element() const
|
|||
return is<HTML::HTMLHtmlElement>(*dom_node());
|
||||
}
|
||||
|
||||
const char* Node::class_name() const
|
||||
{
|
||||
return typeid(*this).name();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue