diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-26 14:19:00 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-26 17:31:01 +0100 |
commit | e96b3315ad80c8ab7e6bb937ce20e146a62c18ae (patch) | |
tree | e248d314e99c94287b0ff49b117d4de44805bda5 /Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp | |
parent | 71e89fe13477ef77736c8fa94661120cd056b392 (diff) | |
download | serenity-e96b3315ad80c8ab7e6bb937ce20e146a62c18ae.zip |
LibWeb: Treat width/height on td/th elements as non-zero dimension value
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLTableCellElement.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; } }); } |