mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Improve support for nested dictionaries
This commit is contained in:
parent
9e12b4175e
commit
3c7ceff46d
6 changed files with 12 additions and 24 deletions
|
@ -78,11 +78,11 @@ fn convert_constraints(js: &BooleanOrMediaTrackConstraints) -> Option<MediaTrack
|
|||
BooleanOrMediaTrackConstraints::Boolean(true) => Some(Default::default()),
|
||||
BooleanOrMediaTrackConstraints::MediaTrackConstraints(ref c) => {
|
||||
Some(MediaTrackConstraintSet {
|
||||
height: convert_culong(&c.parent.height),
|
||||
width: convert_culong(&c.parent.width),
|
||||
aspect: convert_cdouble(&c.parent.aspectRatio),
|
||||
frame_rate: convert_cdouble(&c.parent.frameRate),
|
||||
sample_rate: convert_culong(&c.parent.sampleRate),
|
||||
height: c.parent.height.as_ref().and_then(convert_culong),
|
||||
width: c.parent.width.as_ref().and_then(convert_culong),
|
||||
aspect: c.parent.aspectRatio.as_ref().and_then(convert_cdouble),
|
||||
frame_rate: c.parent.frameRate.as_ref().and_then(convert_cdouble),
|
||||
sample_rate: c.parent.sampleRate.as_ref().and_then(convert_culong),
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue