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 upImplement HTMLMediaElement.crossorigin #22824
Conversation
highfive
commented
Feb 5, 2019
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @asajeffrey (or someone else) soon. |
highfive
commented
Feb 5, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Feb 5, 2019
|
@bors-servo try=wpt |
Implement HTMLMediaElement.crossorigin <!-- Please describe your changes on the following line: --> 1. uncommented HTMLMediaElement webidl 2. added getter and setter to HTMLMedieElementMethods trait implementation 3. added logic to modify RequestInit values based on value of CorsSettings property. added cross origin property to html media elment struct. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22287 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because "the test expectations seem to already cover the new property, and there was no impact on the test results" <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/22824) <!-- Reviewable:end -->
|
|
|
Yes, that seems to be the case. We need to update the tests expectations for
|
| DOMString::from_string(self.cross_origin.borrow().clone()) | ||
| } | ||
| // https://html.spec.whatwg.org/multipage/#attr-media-crossorigin | ||
| make_setter!(SetCrossOrigin, "crossorigin"); |
This comment has been minimized.
This comment has been minimized.
jdm
Feb 11, 2019
Member
This won't work as written, since the cross_origin member is never updated with the new value. We should do what HTMLImageElement does instead:
// https://html.spec.whatwg.org/multipage/#attr-media-crossOrigin
fn GetCrossOrigin(&self) -> Option<DOMString> {
reflect_cross_origin_attribute(self.upcast::<Element>())
}
// https://html.spec.whatwg.org/multipage/#attr-media-crossOrigin
fn SetCrossOrigin(&self, value: Option<DOMString>) {
set_cross_origin_attribute(self.upcast::<Element>(), value);
}| @@ -16,7 +16,7 @@ interface HTMLMediaElement : HTMLElement { | |||
| [CEReactions] attribute USVString src; | |||
| attribute MediaProvider? srcObject; | |||
| readonly attribute USVString currentSrc; | |||
| // [CEReactions] attribute DOMString crossOrigin; | |||
| [CEReactions] attribute DOMString crossOrigin; | |||
This comment has been minimized.
This comment has been minimized.
jdm
Feb 11, 2019
Member
This should be crossOrigin? per https://html.spec.whatwg.org/multipage/media.html#media-elements:dom-media-crossorigin.
|
@andrealexandre Are you planning to keep working on this? |
|
I am closing this one due to the lack of activity. @andrealexandre feel free to reopen if you find the time to work on this again. Thanks! |
|
Sorry, been busy these last couple weeks. I'll reopen a new PR after going through the comments and changes mentioned here. |
andrealexandre commentedFeb 5, 2019
•
edited
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is