mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
style: Don't reject negative values at parse time in media features
Clean-up some other test expectations while at it. Differential Revision: https://phabricator.services.mozilla.com/D170677
This commit is contained in:
parent
4ed0f518fb
commit
d68bd45cc3
3 changed files with 9 additions and 9 deletions
|
@ -126,18 +126,18 @@ fn eval_scan(_: &Context, _: Option<Scan>) -> bool {
|
|||
}
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries-4/#color
|
||||
fn eval_color(context: &Context) -> u32 {
|
||||
fn eval_color(context: &Context) -> i32 {
|
||||
unsafe { bindings::Gecko_MediaFeatures_GetColorDepth(context.device().document()) }
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries-4/#color-index
|
||||
fn eval_color_index(_: &Context) -> u32 {
|
||||
fn eval_color_index(_: &Context) -> i32 {
|
||||
// We should return zero if the device does not use a color lookup table.
|
||||
0
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/mediaqueries-4/#monochrome
|
||||
fn eval_monochrome(context: &Context) -> u32 {
|
||||
fn eval_monochrome(context: &Context) -> i32 {
|
||||
// For color devices we should return 0.
|
||||
unsafe { bindings::Gecko_MediaFeatures_GetMonochromeBitsPerPixel(context.device().document()) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue