From 9ac7b6fad1e02423f178ee1ee7074a08817769fb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 17 Oct 2019 23:54:00 +0200 Subject: [PATCH] LibHTML: Don't assert when encountering an unknown font-weight --- Libraries/LibHTML/CSS/StyleProperties.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/LibHTML/CSS/StyleProperties.cpp b/Libraries/LibHTML/CSS/StyleProperties.cpp index ff3528f7d7..2ad7ef1447 100644 --- a/Libraries/LibHTML/CSS/StyleProperties.cpp +++ b/Libraries/LibHTML/CSS/StyleProperties.cpp @@ -51,8 +51,10 @@ void StyleProperties::load_font() const weight = ""; else if (font_weight == "bold") weight = "Bold"; - else - ASSERT_NOT_REACHED(); + else { + dbg() << "Unknown font-weight: " << font_weight; + weight = ""; + } auto look_for_file = [](const StringView& expected_name) -> String { // TODO: handle font sizes properly?