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 <media> infrastructure #8454

Merged
merged 13 commits into from May 4, 2016
Merged

Implement basic <media> infrastructure #8454

merged 13 commits into from May 4, 2016

Conversation

@jdm
Copy link
Member

jdm commented Nov 10, 2015

This gets us to the point where we can start playing with actually integrating rust-media to process the data received by the network request, as currently it's just ignored.

Review on Reviewable

@highfive
Copy link

highfive commented Nov 10, 2015

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@jdm
Copy link
Member Author

jdm commented Nov 10, 2015

Note: the diff isn't as bad as the diffstat makes it appear, because I enabled all of the skipped WPT.

@jdm
Copy link
Member Author

jdm commented Nov 10, 2015

479ce84 will be omitted in favour of #8430.

@eefriedman
Copy link
Contributor

eefriedman commented Nov 10, 2015

From tidy:

./components/script/dom/htmlmediaelement.rs:10: use statement is not in alphabetical order
    expected: dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementConstants::*
    found: dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods
./components/script/dom/htmlmediaelement.rs:11: use statement is not in alphabetical order
    expected: dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods
    found: dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementConstants::*
./components/script/dom/htmlmediaelement.rs:375: missing space before {
./components/script/dom/htmlmediaelement.rs:491: method declared in webidl is missing a comment with a specification link
./components/script/dom/htmlmediaelement.rs:495: method declared in webidl is missing a comment with a specification link
./components/script/dom/mediaerror.rs:33: method declared in webidl is missing a comment with a specification link
./components/script/dom/webidls/MediaError.webidl:6: link to WHATWG may break in the future, use this format instead: https://html.spec.whatwg.org/multipage/#mediaerror
@eefriedman eefriedman self-assigned this Nov 10, 2015
@jdm jdm added the S-fails-tidy label Nov 10, 2015
@eefriedman
Copy link
Contributor

eefriedman commented Nov 10, 2015

(I'm skipping reviewing 479ce84; I'm assuming all the changes are part of #8430.)


Reviewed 3 of 3 files at r1, 5 of 5 files at r2, 107 of 107 files at r3, 9 of 9 files at r4, 20 of 20 files at r5, 2 of 2 files at r6, 8 of 8 files at r7, 9 of 9 files at r8, 2 of 2 files at r9, 4 of 4 files at r10.
Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.


components/script/dom/htmlmediaelement.rs, line 38 [r1] (raw file):
Missing spec link.


components/script/dom/htmlmediaelement.rs, line 42 [r1] (raw file):
Missing spec link.


components/script/dom/htmlmediaelement.rs, line 35 [r3] (raw file):
Is using Trusted here really safe? There isn't anything preventing the media element from being detached from the document and garbage-collected.


components/script/dom/htmlmediaelement.rs, line 57 [r3] (raw file):
This seems confusing at best; could you just store a separate bool to suppress the data_available callbacks?


components/script/dom/htmlmediaelement.rs, line 70 [r3] (raw file):
Doesn't HAVE_METADATA mean you have enough data to actually determine the metadata? The payload could be as little as one byte. (A TODO would be sufficient for now.)


components/script/dom/htmlmediaelement.rs, line 278 [r5] (raw file):
This can just be self.Autoplay().


components/script/dom/htmlmediaelement.rs, line 596 [r6] (raw file):
This seems extremely indirect; why not just call internal_pause_steps()?


components/script/dom/htmlmediaelement.rs, line 375 [r10] (raw file):
Space before brace. Also, the string comparison is a bit inefficient.


components/script/dom/htmlmediaelement.rs, line 510 [r10] (raw file):
You might want to explicitly note here that "The attribute's missing value default is user-agent defined".


Comments from the review on Reviewable.io

@jdm
Copy link
Member Author

jdm commented Nov 10, 2015

@eefriedman
Copy link
Contributor

eefriedman commented Nov 10, 2015

Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.


components/script/dom/htmlmediaelement.rs, line 35 [r3] (raw file):
Err, of course, sorry. I haven't had to mess with Trusted yet.


components/script/dom/htmlmediaelement.rs, line 278 [r5] (raw file):
I just meant "as opposed to writing out self.upcast::<Element>().has_attribute(&Atom::from_slice("autoplay"))".


components/script/dom/htmlmediaelement.rs, line 596 [r6] (raw file):
Oh, sorry, I misread await_stable_state. That makes sense.


Comments from the review on Reviewable.io

@jdm
Copy link
Member Author

jdm commented Nov 10, 2015

Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.


components/script/dom/htmlmediaelement.rs, line 278 [r5] (raw file):
Whoops, I was looking at an earlier revision in Reviewable where this appeared to be a comment about //TODO step N (autoplay logic).


Comments from the review on Reviewable.io

@eefriedman
Copy link
Contributor

eefriedman commented Nov 10, 2015

Review status: 15 of 108 files reviewed at latest revision, 10 unresolved discussions, some commit checks failed.


components/script/dom/htmlmediaelement.rs, line 505 [r10] (raw file):
"src" is a URL attribute, so this needs to use make_url_getter!. (The wpt tests for url attributes don't currently work correctly on servo, so there will be test failures.)


Comments from the review on Reviewable.io

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 11, 2015

I'd like to look at this PR before landing at some point.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 12, 2015

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

@jdm
Copy link
Member Author

jdm commented Jan 4, 2016

Just rebased; no comments addressed.

@bors-servo
Copy link
Contributor

bors-servo commented Jan 10, 2016

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

@jdm
Copy link
Member Author

jdm commented Feb 5, 2016

Now requires servo/string-cache#139.

@jdm jdm force-pushed the jdm:media branch from 750c935 to eed7c57 Feb 5, 2016
@jdm jdm force-pushed the jdm:media branch from f8baa34 to f16c054 May 3, 2016
@highfive
Copy link

highfive commented May 3, 2016

New code was committed to pull request.

@jdm
Copy link
Member Author

jdm commented May 3, 2016

@bors-servo: r=KiChjang

@bors-servo
Copy link
Contributor

bors-servo commented May 3, 2016

📌 Commit f16c054 has been approved by KiChjang

@bors-servo
Copy link
Contributor

bors-servo commented May 3, 2016

Testing commit f16c054 with merge f9d9cd3...

bors-servo added a commit that referenced this pull request May 3, 2016
Implement basic <media> infrastructure

This gets us to the point where we can start playing with actually integrating rust-media to process the data received by the network request, as currently it's just ignored.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8454)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 4, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented May 4, 2016

  ▶ TIMEOUT [expected OK] /html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-percentage.html
  │ 
  └ Xlib:  extension &#34;XFree86-VidModeExtension&#34; missing on display &#34;:0&#34;.

  ▶ Unexpected subtest result in /html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-percentage.html:
  │ TIMEOUT [expected PASS] placeholder: &#39;iframe&#39;, containerHeightStyle: &#39;400px&#39;, placeholderWidthAttr: &#39;50%&#39;, placeholderHeightAttr: &#39;100%&#39;, svgViewBoxAttr: &#39;0 0 100 200&#39;, svgWidthAttr: &#39;25%&#39;, svgHeightAttr: &#39;25%&#39;, 
  └   → Test timed out
@jdm
Copy link
Member Author

jdm commented May 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 4, 2016

Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented May 4, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented May 4, 2016

  ▶ TIMEOUT [expected OK] /html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-percentage.html
  │ 
  └ Xlib:  extension &#34;XFree86-VidModeExtension&#34; missing on display &#34;:0&#34;.

  ▶ Unexpected subtest result in /html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-percentage.html:
  │ TIMEOUT [expected PASS] placeholder: &#39;iframe&#39;, containerWidthStyle: &#39;400px&#39;, placeholderWidthAttr: &#39;100&#39;, placeholderHeightAttr: &#39;100%&#39;, svgViewBoxAttr: &#39;0 0 100 200&#39;, svgWidthAttr: &#39;25%&#39;, svgHeightAttr: &#39;25%&#39;, 
  └   → Te</span><span class="stdout">st timed out
@cbrewster
Copy link
Member

cbrewster commented May 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 4, 2016

Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented May 4, 2016

@bors-servo bors-servo merged commit f16c054 into servo:master May 4, 2016
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

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