Bug 1284350. Backed out changeset 06bf533a2bdd (Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald)
This commit is contained in:
@@ -6504,19 +6504,11 @@ HTMLMediaElement::OnVisibilityChange(Visibility aOldVisibility,
|
||||
break;
|
||||
}
|
||||
case Visibility::NONVISIBLE: {
|
||||
if (mPlayTime.IsStarted()) {
|
||||
// Not visible, play time is running -> Start hidden play time if needed.
|
||||
HiddenVideoStart();
|
||||
}
|
||||
|
||||
mDecoder->NotifyOwnerActivityChanged(false);
|
||||
break;
|
||||
}
|
||||
case Visibility::MAY_BECOME_VISIBLE: {
|
||||
if (aOldVisibility == Visibility::NONVISIBLE) {
|
||||
// Visible -> Just pause hidden play time (no-op if already paused).
|
||||
HiddenVideoStop();
|
||||
|
||||
mDecoder->NotifyOwnerActivityChanged(true);
|
||||
} else if (aOldVisibility == Visibility::IN_DISPLAYPORT) {
|
||||
// Do nothing.
|
||||
@@ -6524,9 +6516,6 @@ HTMLMediaElement::OnVisibilityChange(Visibility aOldVisibility,
|
||||
break;
|
||||
}
|
||||
case Visibility::IN_DISPLAYPORT: {
|
||||
// Visible -> Just pause hidden play time (no-op if already paused).
|
||||
HiddenVideoStop();
|
||||
|
||||
mDecoder->NotifyOwnerActivityChanged(true);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user