mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Apply HTMLTableSectionElement height presentational hint
This commit is contained in:
committed by
Sam Atkins
parent
3ffc7bd131
commit
ea80167723
@@ -107,7 +107,8 @@ bool HTMLTableSectionElement::is_presentational_hint(FlyString const& name) cons
|
||||
|
||||
return first_is_one_of(name,
|
||||
HTML::AttributeNames::background,
|
||||
HTML::AttributeNames::bgcolor);
|
||||
HTML::AttributeNames::bgcolor,
|
||||
HTML::AttributeNames::height);
|
||||
}
|
||||
|
||||
void HTMLTableSectionElement::apply_presentational_hints(GC::Ref<CSS::CascadedProperties> cascaded_properties) const
|
||||
@@ -122,6 +123,9 @@ void HTMLTableSectionElement::apply_presentational_hints(GC::Ref<CSS::CascadedPr
|
||||
else if (name == HTML::AttributeNames::bgcolor) {
|
||||
if (auto color = parse_legacy_color_value(value); color.has_value())
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::BackgroundColor, CSS::CSSColorValue::create_from_color(color.value()));
|
||||
} else if (name == HTML::AttributeNames::height) {
|
||||
if (auto parsed_value = parse_dimension_value(value))
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::Height, parsed_value.release_nonnull());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user