We can actually let `processCue()` to handle rendering cues or cleaning displayed cues, no need to use another way to clear the cue.
The advantages is to make the code cleaner and easier to read, now we just need to know JS side would handle all rendering stuffs for us. We don't need to have different behavior when there is no showing cue.
The way we clear displayed cues are intuitive, we would remove all child nodes under the overlay, which are used to display cues.
Differential Revision: https://phabricator.services.mozilla.com/D31171
--HG--
extra : moz-landing-system : lando
We can actually let `processCue()` to handle rendering cues or cleaning displayed cues, no need to use another way to clear the cue.
The advantages is to make the code cleaner and easier to read, now we just need to know JS side would handle all rendering stuffs for us. We don't need to have different behavior when there is no showing cue.
The way we clear displayed cues are intuitive, we would remove all child nodes under the overlay, which are used to display cues.
Differential Revision: https://phabricator.services.mozilla.com/D31171
--HG--
extra : moz-landing-system : lando
In patch2, whenever the media element's readyState is changed back to HAVE_NOTHING, we would reset all cues' active flag and update cue display in order to hide them.
It also means that we should not set any cue's flag when media element's readyState is `HAVE_NOTHING`, so we should abort the `TimeMarchesOn` in this situation.
Differential Revision: https://phabricator.services.mozilla.com/D30390
--HG--
extra : moz-landing-system : lando
According to the spec [1], `current cues` and `other cues` should only contain cues from `hidden` or `showing` text tracks.
In this patch, text track would be responsible to add `current cues` and `other cues` to the cues list by calling `GetCurrentCuesAndOtherCues()`.
If the text track is disabled, then it won't add any cues to the cues list.
In addition, in order to reduce the size of `other cues` (as actually we don't need to process all cues in the `other cues`), we use the time interval to only get the cues which are overlapping with the time interval.
[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on
Differential Revision: https://phabricator.services.mozilla.com/D24475
--HG--
extra : moz-landing-system : lando
It would be helpful if we can also print the information in `TextTrack` and `TextTrackCue`.
Differential Revision: https://phabricator.services.mozilla.com/D23449
--HG--
extra : moz-landing-system : lando
Automatically print `TextTrackManager`'s address for the log marco, also update some exist logs.
Differential Revision: https://phabricator.services.mozilla.com/D23448
--HG--
extra : moz-landing-system : lando
Use more general name `WebVTT` for this log module, which will include other debug logs in other files later.
Differential Revision: https://phabricator.services.mozilla.com/D23447
--HG--
extra : moz-landing-system : lando
In this comparison, we only process `hidden` or `showing` track which should not return null TextTrackCueList.
Differential Revision: https://phabricator.services.mozilla.com/D23087
--HG--
extra : moz-landing-system : lando
We should update cue display everytime when the cues list changed.
In addition, we shouldn't check whether cue is active when we update display, because it's always inactive when the cue has been removed from `TextTrack::RemoveCue()`.
Differential Revision: https://phabricator.services.mozilla.com/D21143
--HG--
extra : moz-landing-system : lando
As the `active cues list` would be automatically contruct when there are any active cues being added or inactive cues being removed, we have no need to use dirty to reset the `active cues list`.
Differential Revision: https://phabricator.services.mozilla.com/D22150
--HG--
extra : moz-landing-system : lando
According to the spec [1], the `current cue` is not equal with the `active cue`, because it might contain non active cues, which might be set to active later during the `TimeMarchesOn`.
The `current cue` should be a list of cues, initialized to contain all the cues of all the hidden or showing text tracks of the media element (not the disabled ones) whose start times are less than or equal to the current playback position and whose end times are greater than the current playback position.
[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on
Differential Revision: https://phabricator.services.mozilla.com/D22148
--HG--
extra : moz-landing-system : lando
Due to the state watcher logic, mirror tasks can be dispatched while in stable state. We must not have visible aJS change during such stable state.
Differential Revision: https://phabricator.services.mozilla.com/D12699
--HG--
extra : moz-landing-system : lando
With UA Widget, the videocontrols container is created lazily.
It won't be a problem for WebVTT.processCues() in vtt.jsm, so
TextTrackManager::UpdateCueDisplay() should not early return there, but pass
nullptr to it.
Differential Revision: https://phabricator.services.mozilla.com/D3667
--HG--
extra : moz-landing-system : lando
This prevents XBL binding from being attached, and create the Shadow Root to
host controls to be created by the script.
Shadow Root and the JS controls are lazily constructed when the controls
attribute is set.
Set nsVideoFrame as dynamic-leaf so it will ignore content child frames when
the controls are XBL anonymous content, and handles child frames from controls
in the Shadow DOM. The content nodes are still ignored since there is no
<slot>s in our Shadow DOM.
MozReview-Commit-ID: 3hk41iMa07n
--HG--
extra : rebase_source : f6f8a3facc9d83f5626cf5f3b4e3fa27438a8a8f
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.
MozReview-Commit-ID: 99648Lm46T5
From the crash report and code logic, it is possible that the KillClearOnShutdown comes and the NS_XPCOM_SHUTDOWN_OBSERVER_ID never comes when getting obsercerService fail.
So add null check for the sParserWrapper and combine mShutdown to a new function.
MozReview-Commit-ID: Cj5ph2JrO7v
--HG--
extra : rebase_source : 4f9982a3e44e6f1a4db48739af92dc04cb0112d6
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.
MozReview-Commit-ID: 6s78RvPFMzv
--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
1. Sort by TextTrack. 2. Sort by time. 3. Sort by the order of added to TextTrack.
MozReview-Commit-ID: 4nwx6U5dMpy
--HG--
extra : rebase_source : 2998c48982e40604b068ffca525691c5b69ae2cf