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

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).
This commit is contained in:
Andreas Kling 2022-02-13 01:02:00 +01:00
parent 58ce2dd088
commit c52dc87a42
4 changed files with 113 additions and 2 deletions

View file

@ -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)