From b8dc1fc19537c5476b5a177b66f83ea69d31bfe7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 28 Jun 2020 14:30:03 +0200 Subject: [PATCH] LibWeb: Turn into a CSS width property --- Libraries/LibWeb/DOM/HTMLTableCellElement.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/LibWeb/DOM/HTMLTableCellElement.cpp b/Libraries/LibWeb/DOM/HTMLTableCellElement.cpp index a76ce44315..7a7a5fa994 100644 --- a/Libraries/LibWeb/DOM/HTMLTableCellElement.cpp +++ b/Libraries/LibWeb/DOM/HTMLTableCellElement.cpp @@ -25,6 +25,7 @@ */ #include +#include namespace Web { @@ -53,6 +54,11 @@ void HTMLTableCellElement::apply_presentational_hints(StyleProperties& style) co style.set_property(CSS::PropertyID::TextAlign, value.view()); return; } + if (name == HTML::AttributeNames::width) { + if (auto parsed_value = parse_css_value(CSS::ParsingContext(document()), value)) + style.set_property(CSS::PropertyID::Width, parsed_value.release_nonnull()); + return; + } }); }