mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Support the 'x' resolution unit identifier
The 'x' unit is the same as 'dppx', but was previously not considered when parsing resolutions.
This commit is contained in:
parent
ef65694ac0
commit
7ed08a401f
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||||
|
* Copyright (c) 2024, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
@ -56,7 +57,7 @@ Optional<Resolution::Type> Resolution::unit_from_name(StringView name)
|
||||||
return Type::Dpi;
|
return Type::Dpi;
|
||||||
} else if (name.equals_ignoring_ascii_case("dpcm"sv)) {
|
} else if (name.equals_ignoring_ascii_case("dpcm"sv)) {
|
||||||
return Type::Dpcm;
|
return Type::Dpcm;
|
||||||
} else if (name.equals_ignoring_ascii_case("dppx"sv)) {
|
} else if (name.equals_ignoring_ascii_case("dppx"sv) || name.equals_ignoring_ascii_case("x"sv)) {
|
||||||
return Type::Dppx;
|
return Type::Dppx;
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user