diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-22 19:53:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-22 19:53:22 +0100 |
commit | beba585f3742f373f7420233d07d45f5a13afe11 (patch) | |
tree | 6bc07f248dc9bb5b57164497f2519f2f4c55480e /Libraries/LibWeb/DOM/Event.h | |
parent | 7309642ca88a04c1039ce5bb312aa32687abfe9c (diff) | |
download | serenity-beba585f3742f373f7420233d07d45f5a13afe11.zip |
LibWeb: Use FlyString for DOM event names
Diffstat (limited to 'Libraries/LibWeb/DOM/Event.h')
-rw-r--r-- | Libraries/LibWeb/DOM/Event.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Libraries/LibWeb/DOM/Event.h b/Libraries/LibWeb/DOM/Event.h index ca2ca845db..329da9813e 100644 --- a/Libraries/LibWeb/DOM/Event.h +++ b/Libraries/LibWeb/DOM/Event.h @@ -1,7 +1,6 @@ #pragma once -#include <AK/RefCounted.h> -#include <AK/String.h> +#include <AK/FlyString.h> #include <LibWeb/Bindings/Wrappable.h> namespace Web { @@ -12,25 +11,25 @@ class Event public: using WrapperType = Bindings::EventWrapper; - static NonnullRefPtr<Event> create(String event_name) + static NonnullRefPtr<Event> create(const FlyString& event_name) { - return adopt(*new Event(move(event_name))); + return adopt(*new Event(event_name)); } virtual ~Event() {} - const String& name() const { return m_event_name; } + const FlyString& name() const { return m_event_name; } virtual bool is_mouse_event() const { return false; } protected: - Event(String event_name) - : m_event_name(move(event_name)) + Event(const FlyString& event_name) + : m_event_name(event_name) { } private: - String m_event_name; + FlyString m_event_name; }; } |