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 Ended media attribute #22348
Conversation
highfive
commented
Dec 1, 2018
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @avadacatavra (or someone else) soon. |
highfive
commented
Dec 1, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 1, 2018
|
Wonderfull work! I have only a few minor comments. |
|
|
||
| // XXX Placeholder for [https://github.com/servo/servo/issues/22293] | ||
| #[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)] | ||
| pub enum PlaybackDirection { |
This comment has been minimized.
This comment has been minimized.
| this.upcast::<EventTarget>().fire_event(atom!("timeupdate")); | ||
|
|
||
| // Step 3.2. | ||
| if this.Ended() && !this.Loop() { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| // the HTMLMediaElementMethods::Ended method | ||
|
|
||
| // Step 3. | ||
| self.queue_reaches_the_end_steps(); |
This comment has been minimized.
This comment has been minimized.
ferjm
Dec 5, 2018
Member
Since this is only going to be used here, could we inline the implementation of queue_reaches_the_end_steps here?
This comment has been minimized.
This comment has been minimized.
germangb
Dec 7, 2018
Author
Contributor
Yes, the reason I put it there is because I looked for examples of using the queue and tried to follow the same pattern. But it this case I'm splitting the steps between two methods, which probably hurts more than it helps..
Thanks for the feedback!
|
@bors-servo try=wpt |
Implement Ended media attribute <!-- Please describe your changes on the following line: --> This PR should implement: * New method `HTMLMediaElement::earliest_possible_position()` for the [earliest possible position](https://html.spec.whatwg.org/multipage/media.html#earliest-possible-position) * `Ended` attribute following https://html.spec.whatwg.org/multipage/media.html#ended-playback * Queue steps for when the playback position reaches the end This PR contains placeholders for the following issues (I can rebase changes after the corresponding PRs get merged) - #22321 (Define the Loop attribute) - #22293 (To identify playback direction. Either forwards or backwards) --- <!-- 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 - [ ] These changes fix #22294. <!-- 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/22348) <!-- Reviewable:end -->
|
|
|
This patch makes some WPT pass:
So we need to update the test expectations before merging. |
|
According to the readme (in this case) I should remove the metadata files where all the expectations are no longer |
Yes, that's correct. |
|
I think this is ready to be merged after squashing the commits. Thanks for the great work done here. |
|
Squashed! |
|
@bors-servo r+ |
|
|
|
hmm, right, I was confused by the |
|
@bors-servo try=wpt |
|
@bors-servo retry |
Implement Ended media attribute <!-- Please describe your changes on the following line: --> This PR should implement: * New method `HTMLMediaElement::earliest_possible_position()` for the [earliest possible position](https://html.spec.whatwg.org/multipage/media.html#earliest-possible-position) * `Ended` attribute following https://html.spec.whatwg.org/multipage/media.html#ended-playback * Queue steps for when the playback position reaches the end This PR contains placeholders for the following issues (I can rebase changes after the corresponding PRs get merged) - #22321 (Define the Loop attribute) - #22293 (To identify playback direction. Either forwards or backwards) --- <!-- 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 #22294. <!-- 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/22348) <!-- Reviewable:end -->
|
|
We need to update the expectations for |
|
|
|
Some of the patterns in the player event's match statement had been rearranged |
|
@bors-servo try=wpt |
Implement Ended media attribute <!-- Please describe your changes on the following line: --> This PR should implement: * New method `HTMLMediaElement::earliest_possible_position()` for the [earliest possible position](https://html.spec.whatwg.org/multipage/media.html#earliest-possible-position) * `Ended` attribute following https://html.spec.whatwg.org/multipage/media.html#ended-playback * Queue steps for when the playback position reaches the end This PR contains placeholders for the following issues (I can rebase changes after the corresponding PRs get merged) - #22321 (Define the Loop attribute) - #22293 (To identify playback direction. Either forwards or backwards) --- <!-- 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 #22294. <!-- 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/22348) <!-- Reviewable:end -->
|
|
|
@bors-servo r+ |
|
|
Implement Ended media attribute <!-- Please describe your changes on the following line: --> This PR should implement: * New method `HTMLMediaElement::earliest_possible_position()` for the [earliest possible position](https://html.spec.whatwg.org/multipage/media.html#earliest-possible-position) * `Ended` attribute following https://html.spec.whatwg.org/multipage/media.html#ended-playback * Queue steps for when the playback position reaches the end This PR contains placeholders for the following issues (I can rebase changes after the corresponding PRs get merged) - #22321 (Define the Loop attribute) - #22293 (To identify playback direction. Either forwards or backwards) --- <!-- 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 #22294. <!-- 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/22348) <!-- Reviewable:end -->
|
|
germangb commentedDec 1, 2018
•
edited by ferjm
This PR should implement:
HTMLMediaElement::earliest_possible_position()for the earliest possible positionEndedattribute following https://html.spec.whatwg.org/multipage/media.html#ended-playbackThis PR contains placeholders for the following issues (I can rebase changes after the corresponding PRs get merged)
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is