From e96b3315ad80c8ab7e6bb937ce20e146a62c18ae Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 26 Mar 2022 14:19:00 +0100 Subject: LibWeb: Treat width/height on td/th elements as non-zero dimension value --- Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp') diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp index 76fdfd998c..763c512dae 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp @@ -36,9 +36,13 @@ void HTMLTableCellElement::apply_presentational_hints(CSS::StyleProperties& styl return; } if (name == HTML::AttributeNames::width) { - if (auto parsed_value = parse_html_length(document(), value)) + if (auto parsed_value = parse_nonzero_dimension_value(value)) style.set_property(CSS::PropertyID::Width, parsed_value.release_nonnull()); return; + } else if (name == HTML::AttributeNames::height) { + if (auto parsed_value = parse_nonzero_dimension_value(value)) + style.set_property(CSS::PropertyID::Height, parsed_value.release_nonnull()); + return; } }); } -- cgit v1.2.3