mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Always compare attribute names directly
Attributes are already stored with their names in lowercase, so we can do a direct comparison instead of a case-insensitive one.
This commit is contained in:
Notes:
github-actions[bot]
2025-06-05 11:11:21 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/6f4df839175 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4995
@@ -40,7 +40,7 @@ void HTMLTableCaptionElement::apply_presentational_hints(GC::Ref<CSS::CascadedPr
|
||||
{
|
||||
HTMLElement::apply_presentational_hints(cascaded_properties);
|
||||
for_each_attribute([&](auto& name, auto& value) {
|
||||
if (name.equals_ignoring_ascii_case("align"sv)) {
|
||||
if (name == HTML::AttributeNames::align) {
|
||||
if (value == "bottom"sv)
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::CaptionSide, CSS::CSSKeywordValue::create(CSS::Keyword::Bottom));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user