Bug 1382574 - part2 : remove HTMLMediaElement::GetHasUserInteraction().
MozReview-Commit-ID: 3MaumQvcR1q
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -735,21 +735,16 @@ public:
void NotifyCueUpdated(TextTrackCue *aCue) {
if (mTextTrackManager) {
mTextTrackManager->NotifyCueUpdated(aCue);
}
}
void NotifyCueDisplayStatesChanged();
- bool GetHasUserInteraction()
- {
- return mHasUserInteraction;
- }
-
// A method to check whether we are currently playing.
bool IsCurrentlyPlaying() const;
// Returns true if the media element is being destroyed. Used in
// dormancy checks to prevent dormant processing for an element
// that will soon be gone.
bool IsBeingDestroyed();
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -629,17 +629,17 @@ public:
private:
nsTArray<RefPtr<TextTrack>> mTextTracks;
};
void
TextTrackManager::DispatchUpdateCueDisplay()
{
if (!mUpdateCueDisplayDispatched && !IsShutdown() &&
- (mMediaElement->GetHasUserInteraction() || mMediaElement->IsCurrentlyPlaying())) {
+ mMediaElement->IsCurrentlyPlaying()) {
WEBVTT_LOG("DispatchUpdateCueDisplay");
nsPIDOMWindowInner* win = mMediaElement->OwnerDoc()->GetInnerWindow();
if (win) {
nsGlobalWindowInner::Cast(win)->Dispatch(
TaskCategory::Other,
NewRunnableMethod("dom::TextTrackManager::UpdateCueDisplay",
this,
&TextTrackManager::UpdateCueDisplay));
@@ -651,17 +651,17 @@ TextTrackManager::DispatchUpdateCueDispl
void
TextTrackManager::DispatchTimeMarchesOn()
{
// Run the algorithm if no previous instance is still running, otherwise
// enqueue the current playback position and whether only that changed
// through its usual monotonic increase during normal playback; current
// executing call upon completion will check queue for further 'work'.
if (!mTimeMarchesOnDispatched && !IsShutdown() &&
- (mMediaElement->GetHasUserInteraction() || mMediaElement->IsCurrentlyPlaying())) {
+ mMediaElement->IsCurrentlyPlaying()) {
WEBVTT_LOG("DispatchTimeMarchesOn");
nsPIDOMWindowInner* win = mMediaElement->OwnerDoc()->GetInnerWindow();
if (win) {
nsGlobalWindowInner::Cast(win)->Dispatch(
TaskCategory::Other,
NewRunnableMethod("dom::TextTrackManager::TimeMarchesOn",
this,
&TextTrackManager::TimeMarchesOn));