Cue might have negative length because user can set cue's end time via `TextTrackCue`'s API and the spec doesn't have strong restriction that the end time should be equal or larger than the start time of the cue.
As the negative length cue won't be displayed, we have no need to add it to the `other cues`.
[1] https://html.spec.whatwg.org/multipage/media.html#dom-texttrackcue-endtime
Differential Revision: https://phabricator.services.mozilla.com/D24857
--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
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.
In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.
Differential Revision: https://phabricator.services.mozilla.com/D21810
--HG--
extra : moz-landing-system : lando
To create a function wrapper which would automatically check whether track list exists, in order to reduce unnecessary checking for TextTrackList.
Differential Revision: https://phabricator.services.mozilla.com/D21809
--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
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.
In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.
Differential Revision: https://phabricator.services.mozilla.com/D21810
--HG--
extra : moz-landing-system : lando
To create a function wrapper which would automatically check whether track list exists, in order to reduce unnecessary checking for TextTrackList.
Differential Revision: https://phabricator.services.mozilla.com/D21809
--HG--
extra : moz-landing-system : lando
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
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.
MozReview-Commit-ID: 5agRGFyUry1
--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
Cue whose start times are less than or equal to the current playback position and
whose end times are greater than the current playback position.
MozReview-Commit-ID: 2I5lgjUUtgB
--HG--
extra : rebase_source : 5396f932da54cf175fe330f0caf85472ac9f7e42
1. If mHasUserInteraction MediaElement is false, don't run the TimeMarchesOn because the element is not played. 2. Update the activeCueList only in TimeMarchesOn(). 3. Run TimeMarchesOn() at the beginning of play. r=rillian
MozReview-Commit-ID: BhwsIfRm3B2
--HG--
extra : rebase_source : 9713d4f467f1d708f65a25e54435d0c6e8ff1816
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout. The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.
CLOSED TREE makes big refactorings like this a piece of cake.
# The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
xargs perl -p -i -e '
s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
s/nsRefPtr ?</RefPtr</g; # handle declarations and variables
'
# Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h
# Handle nsRefPtr.h itself, a couple places that define constructors
# from nsRefPtr, and code generators specially. We do this here, rather
# than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
# things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
mfbt/nsRefPtr.h \
xpcom/glue/nsCOMPtr.h \
xpcom/base/OwningNonNull.h \
ipc/ipdl/ipdl/lower.py \
ipc/ipdl/ipdl/builtin.py \
dom/bindings/Codegen.py \
python/lldbutils/lldbutils/utils.py
# In our indiscriminate substitution above, we renamed
# nsRefPtrGetterAddRefs, the class behind getter_AddRefs. Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'
if [ -d .git ]; then
git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h