Permalink
Browse files

Auto merge of #22477 - ferjm:media_time_marches_on_step_6, r=jdm

Implement step 6 of media `time marches on` algorithm. Improves stability of media WPTs

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

This should help with the WPTs problems observed in #22348 (comment)

Unfortunately, GStreamer does not seem to be very reliable with Ogg (check https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/520) and most of the media-element WPTs uses a short ogv file, so I had to make our `canPlayType` report that it is not able to play this type to make the tests pick the alternative mp4 version of the same files. Once Ogg support for GStreamer improves, we should be able to revert this change.

<!-- 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/22477)
<!-- Reviewable:end -->
  • Loading branch information...
bors-servo committed Jan 10, 2019
2 parents d8b025c + 4d9fb87 commit 4ac5b8a3aea5df3bf374dcfdb22c34f5ff0bafe8
Showing with 822 additions and 259 deletions.
  1. +2 −1 components/script/dom/bindings/trace.rs
  2. +22 −2 components/script/dom/htmlmediaelement.rs
  3. +2 −3 tests/wpt/metadata/html/semantics/embedded-content/media-elements/audio_loop_base.html.ini
  4. +0 −8 tests/wpt/metadata/html/semantics/embedded-content/media-elements/audio_volume_check.html.ini
  5. +0 −13 ...s/wpt/metadata/html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html.ini
  6. +0 −10 tests/wpt/metadata/html/semantics/embedded-content/media-elements/event_timeupdate.html.ini
  7. +0 −10 .../wpt/metadata/html/semantics/embedded-content/media-elements/event_timeupdate_noautoplay.html.ini
  8. +4 −11 tests/wpt/metadata/html/semantics/embedded-content/media-elements/event_volumechange.html.ini
  9. +8 −8 ...tics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html.ini
  10. +4 −5 .../wpt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html.ini
  11. +2 −3 tests/wpt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues.html.ini
  12. +2 −3 tests/wpt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind.html.ini
  13. +2 −3 ...s/wpt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/label.html.ini
  14. +2 −3 ...pt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/language.html.ini
  15. +0 −1 ...metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/oncuechange.html.ini
  16. +3 −4 ...t/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrack/removeCue.html.ini
  17. +0 −1 .../metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime.html.ini
  18. +0 −1 ...s/wpt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id.html.ini
  19. +2 −3 .../metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/onenter.html.ini
  20. +2 −3 ...t/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/onexit.html.ini
  21. +3 −4 ...adata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit.html.ini
  22. +3 −4 ...etadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime.html.ini
  23. +0 −1 ...pt/metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track.html.ini
  24. +3 −4 ...ta/html/semantics/embedded-content/media-elements/interfaces/TextTrackCueList/getCueById.html.ini
  25. +3 −4 ...tadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCueList/getter.html.ini
  26. +0 −1 ...tadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackCueList/length.html.ini
  27. +0 −1 .../metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackList/getter.html.ini
  28. +0 −1 .../metadata/html/semantics/embedded-content/media-elements/interfaces/TextTrackList/length.html.ini
  29. +0 −1 ...adata/html/semantics/embedded-content/media-elements/interfaces/TextTrackList/onaddtrack.html.ini
  30. +0 −1 ...ta/html/semantics/embedded-content/media-elements/interfaces/TextTrackList/onremovetrack.html.ini
  31. +2 −3 ...etadata/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor.html.ini
  32. +0 −1 ...etadata/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/createEvent.html.ini
  33. +0 −1 ...bedded-content/media-elements/loading-the-media-resource/load-removes-queued-error-event.html.ini
  34. +0 −1 ...ent/media-elements/loading-the-media-resource/resource-selection-candidate-insert-before.html.ini
  35. +0 −1 ...ded-content/media-elements/loading-the-media-resource/resource-selection-candidate-moved.html.ini
  36. +0 −1 ...elements/loading-the-media-resource/resource-selection-candidate-remove-addEventListener.html.ini
  37. +0 −1 ...nt/media-elements/loading-the-media-resource/resource-selection-candidate-remove-onerror.html.ini
  38. +0 −1 ...elements/loading-the-media-resource/resource-selection-invoke-insert-source-networkState.html.ini
  39. +0 −1 ...ded-content/media-elements/loading-the-media-resource/resource-selection-pointer-control.html.ini
  40. +0 −1 ...d-content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-br.html.ini
  41. +0 −1 ...ntent/media-elements/loading-the-media-resource/resource-selection-pointer-insert-source.html.ini
  42. +0 −1 ...content/media-elements/loading-the-media-resource/resource-selection-pointer-insert-text.html.ini
  43. +0 −1 ...media-elements/loading-the-media-resource/resource-selection-pointer-remove-source-after.html.ini
  44. +0 −1 ...ntent/media-elements/loading-the-media-resource/resource-selection-pointer-remove-source.html.ini
  45. +0 −1 ...content/media-elements/loading-the-media-resource/resource-selection-pointer-remove-text.html.ini
  46. +0 −1 ...bedded-content/media-elements/loading-the-media-resource/resource-selection-source-media.html.ini
  47. +6 −7 ...html/semantics/embedded-content/media-elements/location-of-the-media-resource/currentSrc.html.ini
  48. +35 −45 tests/wpt/metadata/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html.ini
  49. +0 −6 ...cs/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document.html.ini
  50. +0 −1 ...ics/embedded-content/media-elements/playing-the-media-resource/play-in-detached-document.html.ini
  51. +1 −2 ...ata/html/semantics/embedded-content/media-elements/ready-states/autoplay-hidden.optional.html.ini
  52. +0 −1 ...ml/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html.ini
  53. +0 −1 .../wpt/metadata/html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html.ini
  54. +0 −1 tests/wpt/metadata/html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm.ini
  55. +0 −1 ...wpt/metadata/html/semantics/embedded-content/media-elements/seeking/seek-to-negative-time.htm.ini
  56. +0 −1 tests/wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/__dir__.ini
  57. +11 −0 ...pt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cloneNode.html.ini
  58. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/003.html.ini
  59. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/004.html.ini
  60. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/005.html.ini
  61. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/006.html.ini
  62. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/007.html.ini
  63. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/008.html.ini
  64. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/009.html.ini
  65. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/010.html.ini
  66. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/011.html.ini
  67. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/012.html.ini
  68. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/013.html.ini
  69. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/014.html.ini
  70. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/015.html.ini
  71. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/016.html.ini
  72. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/017.html.ini
  73. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/018.html.ini
  74. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/019.html.ini
  75. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/020.html.ini
  76. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/021.html.ini
  77. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/022.html.ini
  78. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/023.html.ini
  79. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/024.html.ini
  80. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/025.html.ini
  81. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/026.html.ini
  82. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/027.html.ini
  83. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/028.html.ini
  84. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/029.html.ini
  85. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/030.html.ini
  86. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/031.html.ini
  87. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/032.html.ini
  88. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/033.html.ini
  89. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/034.html.ini
  90. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/035.html.ini
  91. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/036.html.ini
  92. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/037.html.ini
  93. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/038.html.ini
  94. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/039.html.ini
  95. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/040.html.ini
  96. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/041.html.ini
  97. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/042.html.ini
  98. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/043.html.ini
  99. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/044.html.ini
  100. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/045.html.ini
  101. +5 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/cors/046.html.ini
  102. +10 −0 ...tadata/html/semantics/embedded-content/media-elements/track/track-element/src-clear-cues.html.ini
  103. +5 −0 ...data/html/semantics/embedded-content/media-elements/track/track-element/src-empty-string.html.ini
  104. +5 −0 ...ata/html/semantics/embedded-content/media-elements/track/track-element/track-active-cues.html.ini
  105. +5 −0 .../html/semantics/embedded-content/media-elements/track/track-element/track-add-remove-cue.html.ini
  106. +4 −0 ...adata/html/semantics/embedded-content/media-elements/track/track-element/track-add-track.html.ini
  107. +4 −0 .../html/semantics/embedded-content/media-elements/track/track-element/track-api-texttracks.html.ini
  108. +5 −0 ...ta/html/semantics/embedded-content/media-elements/track/track-element/track-change-event.html.ini
  109. +4 −0 ...adata/html/semantics/embedded-content/media-elements/track/track-element/track-cue-empty.html.ini
  110. +4 −0 ...data/html/semantics/embedded-content/media-elements/track/track-element/track-cue-inline.html.ini
  111. +4 −0 ...semantics/embedded-content/media-elements/track/track-element/track-cue-mutable-fragment.html.ini
  112. +5 −0 ...ata/html/semantics/embedded-content/media-elements/track/track-element/track-cue-mutable.html.ini
  113. +4 −0 ...emantics/embedded-content/media-elements/track/track-element/track-cue-negative-duration.html.ini
  114. +4 −0 .../embedded-content/media-elements/track/track-element/track-cue-negative-timestamp-events.html.ini
  115. +5 −0 ...mantics/embedded-content/media-elements/track/track-element/track-cue-negative-timestamp.html.ini
  116. +19 −0 ...adata/html/semantics/embedded-content/media-elements/track/track-element/track-cue-order.html.ini
  117. +2 −0 ...dded-content/media-elements/track/track-element/track-cue-rendering-after-controls-added.html.ini
  118. +2 −0 ...ed-content/media-elements/track/track-element/track-cue-rendering-after-controls-removed.html.ini
  119. +4 −0 ...antics/embedded-content/media-elements/track/track-element/track-cue-rendering-empty-cue.html.ini
  120. +2 −0 .../embedded-content/media-elements/track/track-element/track-cue-rendering-line-doesnt-fit.html.ini
  121. +2 −0 ...mbedded-content/media-elements/track/track-element/track-cue-rendering-transformed-video.html.ini
  122. +4 −0 .../html/semantics/embedded-content/media-elements/track/track-element/track-cues-cuechange.html.ini
  123. +4 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-cues-enter-exit.html.ini
  124. +5 −0 ...ata/html/semantics/embedded-content/media-elements/track/track-element/track-cues-missed.html.ini
  125. +5 −0 ...l/semantics/embedded-content/media-elements/track/track-element/track-cues-pause-on-exit.html.ini
  126. +5 −0 ...ta/html/semantics/embedded-content/media-elements/track/track-element/track-cues-seeking.html.ini
  127. +5 −0 ...cs/embedded-content/media-elements/track/track-element/track-cues-sorted-before-dispatch.html.ini
  128. +11 −0 ...tadata/html/semantics/embedded-content/media-elements/track/track-element/track-data-url.html.ini
  129. +5 −0 ...ml/semantics/embedded-content/media-elements/track/track-element/track-default-attribute.html.ini
  130. +5 −0 .../semantics/embedded-content/media-elements/track/track-element/track-delete-during-setup.html.ini
  131. +4 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-disabled-addcue.html.ini
  132. +4 −0 ...tadata/html/semantics/embedded-content/media-elements/track/track-element/track-disabled.html.ini
  133. +5 −0 ...ntics/embedded-content/media-elements/track/track-element/track-element-src-change-error.html.ini
  134. +5 −0 ...l/semantics/embedded-content/media-elements/track/track-element/track-element-src-change.html.ini
  135. +4 −0 ...wpt/metadata/html/semantics/embedded-content/media-elements/track/track-element/track-id.html.ini
  136. +5 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-large-timestamp.html.ini
  137. +5 −0 ...emantics/embedded-content/media-elements/track/track-element/track-load-error-readyState.html.ini
  138. +5 −0 ...s/embedded-content/media-elements/track/track-element/track-load-from-element-readyState.html.ini
  139. +5 −0 ...ntics/embedded-content/media-elements/track/track-element/track-load-from-src-readyState.html.ini
  140. +4 −0 .../embedded-content/media-elements/track/track-element/track-mode-not-changed-by-new-track.html.ini
  141. +4 −0 ...emantics/embedded-content/media-elements/track/track-element/track-mode-triggers-loading.html.ini
  142. +5 −0 ...t/metadata/html/semantics/embedded-content/media-elements/track/track-element/track-mode.html.ini
  143. +4 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-node-add-remove.html.ini
  144. +4 −0 ...ml/semantics/embedded-content/media-elements/track/track-element/track-remove-active-cue.html.ini
  145. +4 −0 ...tics/embedded-content/media-elements/track/track-element/track-remove-insert-ready-state.html.ini
  146. +4 −0 .../semantics/embedded-content/media-elements/track/track-element/track-remove-track-inband.html.ini
  147. +4 −0 ...ta/html/semantics/embedded-content/media-elements/track/track-element/track-remove-track.html.ini
  148. +4 −0 ...l/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html.ini
  149. +5 −0 .../semantics/embedded-content/media-elements/track/track-element/track-text-track-cue-list.html.ini
  150. +4 −0 ...data/html/semantics/embedded-content/media-elements/track/track-element/track-texttracks.html.ini
  151. +4 −0 ...ntics/embedded-content/media-elements/track/track-element/track-webvtt-align-positioning.html.ini
  152. +4 −0 ...mbedded-content/media-elements/track/track-element/track-webvtt-align-text-line-position.html.ini
  153. +11 −0 ...tml/semantics/embedded-content/media-elements/track/track-element/track-webvtt-alignment.html.ini
  154. +8 −0 ...l/semantics/embedded-content/media-elements/track/track-element/track-webvtt-blank-lines.html.ini
  155. +5 −0 ...data/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-bom.html.ini
  156. +8 −0 .../semantics/embedded-content/media-elements/track/track-element/track-webvtt-class-markup.html.ini
  157. +8 −0 ...mantics/embedded-content/media-elements/track/track-element/track-webvtt-cue-identifiers.html.ini
  158. +8 −0 ...tml/semantics/embedded-content/media-elements/track/track-element/track-webvtt-cue-no-id.html.ini
  159. +11 −0 .../semantics/embedded-content/media-elements/track/track-element/track-webvtt-cue-recovery.html.ini
  160. +8 −0 ...emantics/embedded-content/media-elements/track/track-element/track-webvtt-cue-size-align.html.ini
  161. +8 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-cue-size.html.ini
  162. +5 −0 ...mantics/embedded-content/media-elements/track/track-element/track-webvtt-degenerate-cues.html.ini
  163. +5 −0 ...tml/semantics/embedded-content/media-elements/track/track-element/track-webvtt-empty-cue.html.ini
  164. +8 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-entities.html.ini
  165. +5 −0 ...emantics/embedded-content/media-elements/track/track-element/track-webvtt-header-comment.html.ini
  166. +5 −0 ...cs/embedded-content/media-elements/track/track-element/track-webvtt-interspersed-non-cue.html.ini
  167. +4 −0 ...semantics/embedded-content/media-elements/track/track-element/track-webvtt-line-position.html.ini
  168. +5 −0 .../semantics/embedded-content/media-elements/track/track-element/track-webvtt-magic-header.html.ini
  169. +8 −0 ...a/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-markup.html.ini
  170. +5 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-newlines.html.ini
  171. +5 −0 ...ml/semantics/embedded-content/media-elements/track/track-element/track-webvtt-no-timings.html.ini
  172. +2 −0 ...ntics/embedded-content/media-elements/track/track-element/track-webvtt-non-snap-to-lines.html.ini
  173. +11 −0 ...l/semantics/embedded-content/media-elements/track/track-element/track-webvtt-positioning.html.ini
  174. +8 −0 ...html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-settings.html.ini
  175. +8 −0 ...tml/semantics/embedded-content/media-elements/track/track-element/track-webvtt-timestamp.html.ini
  176. +5 −0 .../semantics/embedded-content/media-elements/track/track-element/track-webvtt-timings-hour.html.ini
  177. +5 −0 ...antics/embedded-content/media-elements/track/track-element/track-webvtt-timings-no-hours.html.ini
  178. +5 −0 ...tics/embedded-content/media-elements/track/track-element/track-webvtt-timings-whitespace.html.ini
  179. +2 −0 ...d-content/media-elements/track/track-element/track-webvtt-two-cue-layout-after-first-end.html.ini
  180. +5 −0 ...tics/embedded-content/media-elements/track/track-element/track-webvtt-unsupported-markup.html.ini
  181. +5 −0 ...ata/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-utf8.html.ini
  182. +11 −0 ...a/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-valign.html.ini
  183. +8 −0 ...ta/html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-voice.html.ini
  184. +4 −0 ...ml/semantics/embedded-content/media-elements/track/track-element/vtt-cue-float-precision.html.ini
  185. +25 −26 tests/wpt/metadata/html/semantics/embedded-content/media-elements/user-interface/muted.html.ini
  186. +0 −1 tests/wpt/metadata/html/semantics/embedded-content/media-elements/video_008.htm.ini
  187. +0 −2 tests/wpt/metadata/html/semantics/embedded-content/media-elements/video_loop_base.html.ini
  188. +0 −8 tests/wpt/metadata/html/semantics/embedded-content/media-elements/video_volume_check.html.ini
  189. +0 −20 tests/wpt/metadata/html/semantics/embedded-content/media-elements/volume_nonfinite.html.ini
@@ -130,7 +130,7 @@ use style::values::specified::Length;
use tendril::fmt::UTF8;
use tendril::stream::LossyDecoder;
use tendril::{StrTendril, TendrilSink};
use time::Duration;
use time::{Duration, Timespec};
use uuid::Uuid;
use webrender_api::{DocumentId, ImageKey, RenderApiSender};
use webvr_traits::WebVRGamepadHand;
@@ -488,6 +488,7 @@ unsafe_no_jsmanaged_fields!(dyn Player<Error = ServoMediaError>);
unsafe_no_jsmanaged_fields!(Mutex<MediaFrameRenderer>);
unsafe_no_jsmanaged_fields!(RenderApiSender);
unsafe_no_jsmanaged_fields!(ResourceFetchTiming);
unsafe_no_jsmanaged_fields!(Timespec);

unsafe impl<'a> JSTraceable for &'a str {
#[inline]
@@ -204,6 +204,9 @@ pub struct HTMLMediaElement {
text_tracks_list: MutNullableDom<TextTrackList>,
/// Expected content length of the media asset being fetched or played.
content_length: Cell<Option<u64>>,
/// Time of last timeupdate notification.
#[ignore_malloc_size_of = "Defined in time"]
next_timeupdate_event: Cell<Timespec>,
}

/// <https://html.spec.whatwg.org/multipage/#dom-media-networkstate>
@@ -261,6 +264,7 @@ impl HTMLMediaElement {
played: Rc::new(DomRefCell::new(TimeRangesContainer::new())),
text_tracks_list: Default::default(),
content_length: Cell::new(None),
next_timeupdate_event: Cell::new(time::get_time() + Duration::milliseconds(250)),
}
}

@@ -303,7 +307,16 @@ impl HTMLMediaElement {

/// https://html.spec.whatwg.org/multipage/#time-marches-on
fn time_marches_on(&self) {
// TODO: implement this.
// Step 6.
if time::get_time() > self.next_timeupdate_event.get() {
let window = window_from_node(self);
window
.task_manager()
.media_element_task_source()
.queue_simple_event(self.upcast(), atom!("timeupdate"), &window);
self.next_timeupdate_event
.set(time::get_time() + Duration::milliseconds(350));
}
}

/// <https://html.spec.whatwg.org/multipage/#internal-pause-steps>
@@ -1173,6 +1186,7 @@ impl HTMLMediaElement {
.borrow_mut()
.add(self.playback_position.get(), position);
self.playback_position.set(position);
self.time_marches_on();
},
PlayerEvent::StateChanged(ref state) => match *state {
PlaybackState::Paused => {
@@ -1270,8 +1284,14 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
// https://html.spec.whatwg.org/multipage/#dom-navigator-canplaytype
fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult {
match type_.parse::<Mime>() {
// XXX GStreamer is currently not very reliable playing OGG and most of
// the media related WPTs uses OGG if we report that we are able to
// play this type. So we report that we are unable to play it to force
// the usage of other types.
// https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/520
Ok(ref mime)
if (mime.type_() == mime::APPLICATION && mime.subtype() == mime::OCTET_STREAM) =>
if (mime.type_() == mime::APPLICATION && mime.subtype() == mime::OCTET_STREAM) ||
(mime.subtype() == mime::OGG) =>
{
CanPlayTypeResult::_empty
},
@@ -1,6 +1,5 @@
[audio_loop_base.html]
type: testharness
disabled: extreme timeout
expected: TIMEOUT
[Check if audio.loop is set to true that expecting the seeking event is fired more than once]
expected: FAIL
expected: NOTRUN

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,27 +1,20 @@
[event_volumechange.html]
type: testharness
expected: TIMEOUT
[setting audio.volume fires volumechange]
expected: PASS

[setting audio.muted fires volumechange]
expected: FAIL

[setting audio.volume/muted to the same value does not fire volumechange]
[setting video.volume/muted repeatedly fires volumechange repeatedly]
expected: TIMEOUT

[setting audio.volume/muted repeatedly fires volumechange repeatedly]
[setting audio.volume/muted to the same value does not fire volumechange]
expected: TIMEOUT

[setting video.volume fires volumechange]
expected: PASS

[setting video.muted fires volumechange]
expected: FAIL

[setting video.volume/muted to the same value does not fire volumechange]
[setting audio.volume/muted repeatedly fires volumechange repeatedly]
expected: TIMEOUT

[setting video.volume/muted repeatedly fires volumechange repeatedly]
[setting video.volume/muted to the same value does not fire volumechange]
expected: TIMEOUT

@@ -1,31 +1,31 @@
[crossOrigin.html]
[HTMLMediaElement.crossOrigin]
[HTMLMediaElement.crossOrigin, setting to invalid value]
expected: FAIL

[HTMLMediaElement.crossOrigin, content attribute missing]
[HTMLMediaElement.crossOrigin, content attribute use-credentials]
expected: FAIL

[HTMLMediaElement.crossOrigin, content attribute invalid value]
expected: FAIL

[HTMLMediaElement.crossOrigin, content attribute empty string]
[HTMLMediaElement.crossOrigin, setting to uppercase ANONYMOUS]
expected: FAIL

[HTMLMediaElement.crossOrigin, content attribute uppercase ANONYMOUS]
expected: FAIL

[HTMLMediaElement.crossOrigin, content attribute use-credentials]
expected: FAIL

[HTMLMediaElement.crossOrigin, setting to empty string]
expected: FAIL

[HTMLMediaElement.crossOrigin, setting to invalid value]
[HTMLMediaElement.crossOrigin, content attribute empty string]
expected: FAIL

[HTMLMediaElement.crossOrigin, setting to uppercase ANONYMOUS]
[HTMLMediaElement.crossOrigin, content attribute missing]
expected: FAIL

[HTMLMediaElement.crossOrigin, setting to use-credentials]
expected: FAIL

[HTMLMediaElement.crossOrigin]
expected: FAIL

@@ -1,18 +1,17 @@
[addCue.html]
type: testharness
expected: TIMEOUT
[TextTrack.addCue(), adding a cue to two different tracks]
expected: FAIL

[TextTrack.addCue(), adding a cue to a track twice]
expected: FAIL
[TextTrack.addCue(), adding a cue associated with a track element to other track]
expected: TIMEOUT

[TextTrack.addCue(), adding a removed cue to a different track]
expected: FAIL

[TextTrack.addCue(), adding an associated but removed cue to the same track]
expected: FAIL

[TextTrack.addCue(), adding a cue associated with a track element to other track]
expected: TIMEOUT
[TextTrack.addCue(), adding a cue to a track twice]
expected: FAIL

@@ -1,14 +1,13 @@
[cues.html]
type: testharness
[TextTrack.cues, after addCue()]
expected: FAIL

[TextTrack.cues, different modes]
expected: FAIL

[TextTrack.cues, changing order]
[TextTrack.cues, default attribute]
expected: FAIL

[TextTrack.cues, default attribute]
[TextTrack.cues, changing order]
expected: FAIL

@@ -1,8 +1,7 @@
[kind.html]
type: testharness
[TextTrack.kind, track element]
[TextTrack.kind, \\u0000]
expected: FAIL

[TextTrack.kind, \\u0000]
[TextTrack.kind, track element]
expected: FAIL

@@ -1,8 +1,7 @@
[label.html]
type: testharness
[TextTrack.label]
[TextTrack.label, \\u0000]
expected: FAIL

[TextTrack.label, \\u0000]
[TextTrack.label]
expected: FAIL

@@ -1,8 +1,7 @@
[language.html]
type: testharness
[TextTrack.language]
[TextTrack.language, \\u0000]
expected: FAIL

[TextTrack.language, \\u0000]
[TextTrack.language]
expected: FAIL

@@ -1,5 +1,4 @@
[oncuechange.html]
type: testharness
[TextTrack.oncuechange]
expected: FAIL

@@ -1,9 +1,8 @@
[removeCue.html]
type: testharness
expected: TIMEOUT
[TextTrack.removeCue(), two elementless tracks]
expected: FAIL

[TextTrack.removeCue(), cue from track element]
expected: TIMEOUT

[TextTrack.removeCue(), two elementless tracks]
expected: FAIL

@@ -1,5 +1,4 @@
[endTime.html]
type: testharness
expected: TIMEOUT
[TextTrackCue.endTime, script-created cue]
expected: FAIL
@@ -1,5 +1,4 @@
[id.html]
type: testharness
expected: TIMEOUT
[TextTrackCue.id, script-created cue]
expected: FAIL
@@ -1,9 +1,8 @@
[onenter.html]
type: testharness
expected: ERROR
[TextTrackCue.onenter]
[TextTrackCue.addEventListener/removeEventListener]
expected: FAIL

[TextTrackCue.addEventListener/removeEventListener]
[TextTrackCue.onenter]
expected: FAIL

@@ -1,9 +1,8 @@
[onexit.html]
type: testharness
expected: ERROR
[TextTrackCue.onexit]
[TextTrackCue.addEventListener/removeEventListener]
expected: FAIL

[TextTrackCue.addEventListener/removeEventListener]
[TextTrackCue.onexit]
expected: FAIL

@@ -1,9 +1,8 @@
[pauseOnExit.html]
type: testharness
expected: TIMEOUT
[TextTrackCue.pauseOnExit, script-created cue]
expected: FAIL

[TextTrackCue.pauseOnExit, parsed cue]
expected: TIMEOUT

[TextTrackCue.pauseOnExit, script-created cue]
expected: FAIL

@@ -1,9 +1,8 @@
[startTime.html]
type: testharness
expected: TIMEOUT
[TextTrackCue.startTime, script-created cue]
expected: FAIL

[TextTrackCue.startTime, parsed cue]
expected: TIMEOUT

[TextTrackCue.startTime, script-created cue]
expected: FAIL

@@ -1,5 +1,4 @@
[track.html]
type: testharness
expected: TIMEOUT
[TextTrackCue.track, script-created cue]
expected: FAIL
@@ -1,14 +1,13 @@
[getCueById.html]
type: testharness
[TextTrackCueList.getCueById, no id]
[TextTrackCueList.getCueById, id a\\u0000b]
expected: FAIL

[TextTrackCueList.getCueById, id foo]
expected: FAIL

[TextTrackCueList.getCueById, no 1]
[TextTrackCueList.getCueById, no id]
expected: FAIL

[TextTrackCueList.getCueById, id a\\u0000b]
[TextTrackCueList.getCueById, no 1]
expected: FAIL

@@ -1,11 +1,10 @@
[getter.html]
type: testharness
[TextTrackCueList getter]
[TextTrackCueList getter, no indexed set/create (strict)]
expected: FAIL

[TextTrackCueList getter, no indexed set/create]
[TextTrackCueList getter]
expected: FAIL

[TextTrackCueList getter, no indexed set/create (strict)]
[TextTrackCueList getter, no indexed set/create]
expected: FAIL

Oops, something went wrong.

0 comments on commit 4ac5b8a

Please sign in to comment.