diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-13 01:02:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-13 01:03:49 +0100 |
commit | c52dc87a42cb0d02629e85df3682a7af45087ad1 (patch) | |
tree | 151814c253f2884db004d8b632b0ba5c9514f497 /Userland/Libraries/LibWeb/CSS/Display.h | |
parent | 58ce2dd08806fb998d8705868314d25753674f30 (diff) | |
download | serenity-c52dc87a42cb0d02629e85df3682a7af45087ad1.zip |
LibWeb: Don't crash on unknown CSS display types, fall back to inline
This patch also adds CSS::Display::to_string() so we can log the
unimplemented CSS display value (if you have LIBWEB_CSS_DEBUG enabled).
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Display.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Display.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Display.h b/Userland/Libraries/LibWeb/CSS/Display.h index 634f92d778..b5c248a66a 100644 --- a/Userland/Libraries/LibWeb/CSS/Display.h +++ b/Userland/Libraries/LibWeb/CSS/Display.h @@ -7,6 +7,7 @@ #pragma once #include <AK/Assertions.h> +#include <AK/String.h> namespace Web::CSS { @@ -15,6 +16,8 @@ public: Display() = default; ~Display() = default; + String to_string() const; + bool operator==(Display const& other) const { if (m_type != other.m_type) |