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

🐈🐈🐈 Implement basic <source> take-first-then-fail algo for HtmlMediaElement #21923

Merged
merged 1 commit into from Oct 16, 2018

Conversation

@est31
Copy link
Contributor

est31 commented Oct 11, 2018

The spec has a complicated algorithm for selecting a
element among multiple children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This PR implements a much simpler and restricted approach by
just taking the first child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full
support.

See it in action: https://i.imgur.com/WoEhYj3.gifv


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive
Copy link

highfive commented Oct 11, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/htmlmediaelement.rs
  • @KiChjang: components/script/dom/htmlmediaelement.rs
@highfive
Copy link

highfive commented Oct 11, 2018

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@est31 est31 changed the title Implement basic <source> take-first-then-fail algo for HtmlMediaElement 🐈🐈🐈 Implement basic <source> take-first-then-fail algo for HtmlMediaElement Oct 11, 2018
The spec has a complicated algorithm for selecting a <source>
element among multiple <source> children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This commit implements a much simpler and restricted approach by
just taking the first <source> child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full <source>
support.
@ferjm
Copy link
Member

ferjm commented Oct 15, 2018

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

βŒ› Trying commit af0f7db with merge 0b1f981...

bors-servo added a commit that referenced this pull request Oct 15, 2018
🐈🐈🐈 Implement basic <source> take-first-then-fail algo for HtmlMediaElement

The spec has a complicated algorithm for selecting a <source>
element among multiple <source> children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This PR implements a much simpler and restricted approach by
just taking the first <source> child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full <source>
support.

See it in action: https://i.imgur.com/WoEhYj3.gifv

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/21923)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 15, 2018

πŸ’₯ Test timed out

@jdm
Copy link
Member

jdm commented Oct 15, 2018

There were no unexpected test results.

@ferjm
Copy link
Member

ferjm commented Oct 16, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2018

πŸ“Œ Commit af0f7db has been approved by ferjm

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2018

βŒ› Testing commit af0f7db with merge 1652fe2...

bors-servo added a commit that referenced this pull request Oct 16, 2018
🐈🐈🐈 Implement basic <source> take-first-then-fail algo for HtmlMediaElement

The spec has a complicated algorithm for selecting a <source>
element among multiple <source> children of a HtmlMediaElement
where it loops over all of them, tries each and takes the first
where "everything works out".

This PR implements a much simpler and restricted approach by
just taking the first <source> child, and if that fails,
failing altogether, without looking at any further children.

This is an improvement over the current status and makes gifv
items on imgur playable, although it doesn't mean full <source>
support.

See it in action: https://i.imgur.com/WoEhYj3.gifv

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/21923)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2018

@bors-servo bors-servo merged commit af0f7db into servo:master Oct 16, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.