From 6e128b65127084dec4f6433ec6088dc7119a84f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 26 Feb 2023 00:15:25 +0000 Subject: [PATCH] style: Don't reject negative resolutions either This unveils an issue with image-set() tests, which expect 0x to not parse (inconsistently with media queries). Fix the test, since the spec doesn't restrict the range of values (and more importantly, it shouldn't allow open ranges). Differential Revision: https://phabricator.services.mozilla.com/D170762 --- components/style/values/specified/resolution.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/style/values/specified/resolution.rs b/components/style/values/specified/resolution.rs index 5ed642f9818..bc9df592cb3 100644 --- a/components/style/values/specified/resolution.rs +++ b/components/style/values/specified/resolution.rs @@ -60,10 +60,6 @@ impl Parse for Resolution { ref t => return Err(location.new_unexpected_token_error(t.clone())), }; - if value <= 0. { - return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError)); - } - match_ignore_ascii_case! { &unit, "dpi" => Ok(Resolution::Dpi(value)), "dppx" => Ok(Resolution::Dppx(value)),