summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
index 7014094cf8..2e0ecfa1cd 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
@@ -50,13 +50,11 @@ void HTMLImageElement::apply_presentational_hints(CSS::StyleProperties& style) c
{
for_each_attribute([&](auto& name, auto& value) {
if (name == HTML::AttributeNames::width) {
- if (auto parsed_value = parse_html_length(document(), value)) {
+ if (auto parsed_value = parse_dimension_value(value))
style.set_property(CSS::PropertyID::Width, parsed_value.release_nonnull());
- }
} else if (name == HTML::AttributeNames::height) {
- if (auto parsed_value = parse_html_length(document(), value)) {
+ if (auto parsed_value = parse_dimension_value(value))
style.set_property(CSS::PropertyID::Height, parsed_value.release_nonnull());
- }
}
});
}