Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for MediaTrackConstraints #22874
Conversation
highfive
commented
Feb 13, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Feb 13, 2019
795316c
to
77970cc
|
|
|
Errors about fmt in Travis: info: downloading component 'rustfmt'
info: installing component 'rustfmt'
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 2:
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::MediaStreamConstraints;
+use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::{self, MediaDevicesMethods};
use crate::dom::bindings::codegen::UnionTypes::BooleanOrMediaTrackConstraints;
use crate::dom::bindings::codegen::UnionTypes::ClampedUnsignedLongOrConstrainULongRange as ConstrainULong;
use crate::dom::bindings::codegen::UnionTypes::DoubleOrConstrainDoubleRange as ConstrainDouble;
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 8:
-use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::MediaStreamConstraints;
-use crate::dom::bindings::codegen::Bindings::MediaDevicesBinding::{self, MediaDevicesMethods};
use crate::dom::bindings::reflector::reflect_dom_object;
use crate::dom::bindings::reflector::DomObject;
use crate::dom::bindings::root::DomRoot;
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 15:
use crate::dom::mediastream::MediaStream;
use crate::dom::promise::Promise;
use dom_struct::dom_struct;
-use servo_media::ServoMedia;
use servo_media::streams::capture::{Constrain, ConstrainRange, MediaTrackConstraintSet};
+use servo_media::ServoMedia;
use std::rc::Rc;
#[dom_struct]
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 74:
frame_rate: convert_cdouble(&c.parent.frameRate),
sample_rate: convert_culong(&c.parent.sampleRate),
})
- }
+ },
}
}
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 94:
// the unspecified case is treated as all three being none
None
}
- }
+ },
}
}
Diff in /home/travis/build/servo/servo/components/script/dom/mediadevices.rs at line 114:
// the unspecified case is treated as all three being none
None
}
- }
+ },
}
}
Run `./mach fmt` to fix the formatting |
|
Patches being upstreamed in https://bugzilla.mozilla.org/show_bug.cgi?id=1359269#c4 We can wait for that to land, or just land this as is and re-sync webidl later. |
35d404e
to
9f48e99
Add support for attributes on types in WebIDL WebIDL moved `[Clamp]`, `[RangeEnforced]`, and `[TreatNullAs]` to applying directly to types in heycam/webidl#286. I implemented parser support for this upstream in [bug 1359269](https://bugzilla.mozilla.org/show_bug.cgi?id=1359269). This pull request downstreams those changes and updates codegen as well as any webidls to conform. Needed to land #22874 r? @nox <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22958) <!-- Reviewable:end -->
|
This is now ready for review again, r? @jdm |
|
@bors-servo r+ |
|
|
Add support for MediaTrackConstraints This uses the WebIDL attributes-on-types support landed in #22958 to fill out the MediaTrackConstraints dictionary for constraints that servo-media supports. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22874) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Add support for MediaTrackConstraints This uses the WebIDL attributes-on-types support landed in #22958 to fill out the MediaTrackConstraints dictionary for constraints that servo-media supports. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22874) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
(will file intermittent later) |
Add support for MediaTrackConstraints This uses the WebIDL attributes-on-types support landed in #22958 to fill out the MediaTrackConstraints dictionary for constraints that servo-media supports. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22874) <!-- Reviewable:end -->
|
That's #21067. |
|
|
|
@bors-servo retry |
Add support for MediaTrackConstraints This uses the WebIDL attributes-on-types support landed in #22958 to fill out the MediaTrackConstraints dictionary for constraints that servo-media supports. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22874) <!-- Reviewable:end -->
|
|
Manishearth commentedFeb 13, 2019
•
edited
This uses the WebIDL attributes-on-types support landed in #22958 to fill out the MediaTrackConstraints dictionary for constraints that servo-media supports.
r? @jdm
This change is