diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-28 14:30:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-28 14:30:37 +0200 |
commit | b8dc1fc19537c5476b5a177b66f83ea69d31bfe7 (patch) | |
tree | f617f90483a1e6dd33c818652a58f23d5be7f136 | |
parent | 38d6cc859862b12afe11fc91314c8540cb4f63ad (diff) | |
download | serenity-b8dc1fc19537c5476b5a177b66f83ea69d31bfe7.zip |
LibWeb: Turn <td width> into a CSS width property
-rw-r--r-- | Libraries/LibWeb/DOM/HTMLTableCellElement.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <LibWeb/DOM/HTMLTableCellElement.h> +#include <LibWeb/Parser/CSSParser.h> 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; + } }); } |