mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 16:41:52 +00: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:
parent
bc8a97589f
commit
6f4df83917
Notes:
github-actions[bot]
2025-06-05 11:11:21 +00:00
Author: https://github.com/AtkinsSJ
Commit: 6f4df83917
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4995
7 changed files with 13 additions and 13 deletions
|
@ -40,7 +40,7 @@ void HTMLHeadingElement::apply_presentational_hints(GC::Ref<CSS::CascadedPropert
|
|||
{
|
||||
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 == "left"sv)
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::TextAlign, CSS::CSSKeywordValue::create(CSS::Keyword::Left));
|
||||
else if (value == "right"sv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue