Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MediaTrackConstraints #22874

Merged
merged 3 commits into from Mar 4, 2019

Conversation

Projects
None yet
5 participants
@Manishearth
Copy link
Member

Manishearth commented Feb 13, 2019

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 Reviewable

@highfive

This comment has been minimized.

Copy link

highfive commented Feb 13, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/webidls/MediaDevices.webidl, components/script/dom/rtcpeerconnection.rs, components/script/dom/bindings/trace.rs, components/script/dom/bindings/codegen/parser/WebIDL.py and 2 more
  • @KiChjang: components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/webidls/MediaDevices.webidl, components/script/dom/rtcpeerconnection.rs, components/script/dom/bindings/trace.rs, components/script/dom/bindings/codegen/parser/WebIDL.py and 2 more
@highfive

This comment has been minimized.

Copy link

highfive commented Feb 13, 2019

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@Manishearth Manishearth force-pushed the Manishearth:constraint branch 4 times, most recently from 795316c to 77970cc Feb 13, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 13, 2019

☔️ The latest upstream changes (presumably #22872) made this pull request unmergeable. Please resolve the merge conflicts.

@Manishearth Manishearth force-pushed the Manishearth:constraint branch from 77970cc to ee5dc1c Feb 13, 2019

@CYBAI

This comment has been minimized.

Copy link
Collaborator

CYBAI commented Feb 14, 2019

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
@Manishearth

This comment has been minimized.

Copy link
Member Author

Manishearth commented Feb 14, 2019

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.

@Manishearth Manishearth force-pushed the Manishearth:constraint branch 2 times, most recently from 35d404e to 9f48e99 Feb 14, 2019

bors-servo added a commit that referenced this pull request Mar 4, 2019

Auto merge of #22958 - Manishearth:attrs-on-types, r=nox
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 -->

@Manishearth Manishearth force-pushed the Manishearth:constraint branch from 9f48e99 to 2edae57 Mar 4, 2019

@Manishearth Manishearth changed the title Add support for WebIDL attributes on types; use for supporting MediaTrackConstraints Add support for MediaTrackConstraints Mar 4, 2019

@Manishearth

This comment has been minimized.

Copy link
Member Author

Manishearth commented Mar 4, 2019

This is now ready for review again, r? @jdm

@Manishearth Manishearth force-pushed the Manishearth:constraint branch from 2edae57 to ce635b7 Mar 4, 2019

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Mar 4, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

📌 Commit ce635b7 has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

⌛️ Testing commit ce635b7 with merge 12c60cb...

bors-servo added a commit that referenced this pull request Mar 4, 2019

Auto merge of #22874 - Manishearth:constraint, r=jdm
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

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

💔 Test failed - mac-rel-wpt2

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Mar 4, 2019

@bors-servo retry

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

⌛️ Testing commit ce635b7 with merge db313cf...

bors-servo added a commit that referenced this pull request Mar 4, 2019

Auto merge of #22874 - Manishearth:constraint, r=jdm
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

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

💔 Test failed - linux-rel-wpt

@Manishearth

This comment has been minimized.

Copy link
Member Author

Manishearth commented Mar 4, 2019

@bors-servo retry

  • crash: Failed to receive a response from live font cache (thread LayoutThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/gfx/font_cache_thread.rs:522)

(will file intermittent later)

bors-servo added a commit that referenced this pull request Mar 4, 2019

Auto merge of #22874 - Manishearth:constraint, r=jdm
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

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

⌛️ Testing commit ce635b7 with merge d6eef04...

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Mar 4, 2019

That's #21067.

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

💔 Test failed - linux-rel-css

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Mar 4, 2019

@bors-servo retry

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

⌛️ Testing commit ce635b7 with merge 0f3108c...

bors-servo added a commit that referenced this pull request Mar 4, 2019

Auto merge of #22874 - Manishearth:constraint, r=jdm
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

This comment has been minimized.

Copy link
Contributor

bors-servo commented Mar 4, 2019

@bors-servo bors-servo merged commit ce635b7 into servo:master Mar 4, 2019

3 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.