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
Notes:
github-actions[bot]
2024-10-13 04:24:01 +00:00
Author: https://github.com/skyz1 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7ed08a401f5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1757 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2024, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -56,7 +57,7 @@ Optional<Resolution::Type> Resolution::unit_from_name(StringView name)
|
|||
return Type::Dpi;
|
||||
} else if (name.equals_ignoring_ascii_case("dpcm"sv)) {
|
||||
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 {};
|
||||
|
|
Loading…
Add table
Reference in a new issue